# SDL: Don't use const for non-pointer API parameters

**URL:** <https://discourse.libsdl.org/t/sdl-dont-use-const-for-non-pointer-api-parameters/54654>\
**Category:** SDL Commits\
**Created:** [October 2, 2024, 1:17pm UTC](https://discourse.libsdl.org/t/sdl-dont-use-const-for-non-pointer-api-parameters/54654 "2024-10-02T13:17:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [October 2, 2024, 1:17pm UTC](https://discourse.libsdl.org/t/sdl-dont-use-const-for-non-pointer-api-parameters/54654/1 "2024-10-02T13:17:34Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/d5fe6dd627ecbdbbb261f165a45f7633e5cb7e1d>

```diff
From d5fe6dd627ecbdbbb261f165a45f7633e5cb7e1d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 1 Oct 2024 21:02:50 -0700
Subject: [PATCH] Don't use const for non-pointer API parameters

---
 include/SDL3/SDL_test_common.h | 2 +-
 src/test/SDL_test_common.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/SDL3/SDL_test_common.h b/include/SDL3/SDL_test_common.h
index 0e7e1accdb857..aeffeb93b52bf 100644
--- a/include/SDL3/SDL_test_common.h
+++ b/include/SDL3/SDL_test_common.h
@@ -232,7 +232,7 @@ bool SDLCALL SDLTest_CommonInit(SDLTest_CommonState *state);
  *
  * \returns false if app should quit, true otherwise.
  */
-bool SDLCALL SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv);
+bool SDLCALL SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, int argc, char **argv);
 
 /**
  * Print the details of an event.
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index e3efb1733407a..aed0f644d0973 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -787,7 +787,7 @@ void SDLTest_CommonLogUsage(SDLTest_CommonState *state, const char *argv0, const
     }
 }
 
-bool SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv)
+bool SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, int argc, char **argv)
 {
     int i = 1;
     while (i < argc) {

```
