diff --git a/src/camera/SDL_camera.c b/src/camera/SDL_camera.c index 45b35af952..0c5e835f5a 100644 --- a/src/camera/SDL_camera.c +++ b/src/camera/SDL_camera.c @@ -745,7 +745,7 @@ const SDL_CameraSpec * const *SDL_GetCameraSupportedFormats(SDL_CameraID instanc int i; int num_specs = device->num_specs; - const SDL_CameraSpec **retval = (const SDL_CameraSpec **) SDL_malloc(((num_specs + 1) * sizeof(*retval)) + (num_specs * sizeof (**retval))); + SDL_CameraSpec **retval = (SDL_CameraSpec **) SDL_malloc(((num_specs + 1) * sizeof(*retval)) + (num_specs * sizeof (**retval))); if (retval) { SDL_CameraSpec *specs = (SDL_CameraSpec *)(retval + (num_specs + 1)); SDL_memcpy(specs, device->all_specs, num_specs * sizeof(*specs)); diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index 8c4c7c45bc..b0c3fcb66b 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -762,7 +762,7 @@ int SDL_SendEditingText(const char *text, int start, int length) static const char * const *CreateCandidatesForEvent(char **candidates, int num_candidates) { - const char **event_candidates; + char **event_candidates; int i; char *ptr; size_t total_length = (num_candidates + 1) * sizeof(*event_candidates); @@ -773,7 +773,7 @@ static const char * const *CreateCandidatesForEvent(char **candidates, int num_c total_length += length; } - event_candidates = (const char **)SDL_malloc(total_length); + event_candidates = (char **)SDL_malloc(total_length); if (!event_candidates) { return NULL; } diff --git a/src/locale/SDL_locale.c b/src/locale/SDL_locale.c index ca46db5660..341bf68286 100644 --- a/src/locale/SDL_locale.c +++ b/src/locale/SDL_locale.c @@ -29,7 +29,7 @@ static const SDL_Locale * const *build_locales_from_csv_string(char *csv, int *c size_t alloclen; char *ptr; SDL_Locale *loc; - const SDL_Locale **retval; + SDL_Locale **retval; if (count) { *count = 0; @@ -52,7 +52,7 @@ static const SDL_Locale * const *build_locales_from_csv_string(char *csv, int *c slen = ((size_t)(ptr - csv)) + 1; /* SDL_strlen(csv) + 1 */ alloclen = (num_locales * sizeof(SDL_Locale *)) + (num_locales * sizeof(SDL_Locale)) + slen; - retval = (const SDL_Locale **)SDL_calloc(1, alloclen); + retval = (SDL_Locale **)SDL_calloc(1, alloclen); if (!retval) { return NULL; /* oh well */ } diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 70c3660537..d50af934d3 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1222,7 +1222,7 @@ const SDL_DisplayMode * const *SDL_GetFullscreenDisplayModes(SDL_DisplayID displ { int i; int num_modes; - const SDL_DisplayMode **retval; + SDL_DisplayMode **retval; SDL_VideoDisplay *display = SDL_GetVideoDisplay(displayID); if (count) { @@ -1236,7 +1236,7 @@ const SDL_DisplayMode * const *SDL_GetFullscreenDisplayModes(SDL_DisplayID displ } num_modes = display->num_fullscreen_modes; - retval = (const SDL_DisplayMode **)SDL_malloc((num_modes + 1) * sizeof(*retval) + num_modes * sizeof(**retval)); + retval = (SDL_DisplayMode **)SDL_malloc((num_modes + 1) * sizeof(*retval) + num_modes * sizeof(**retval)); if (retval) { SDL_DisplayMode *modes = (SDL_DisplayMode *)((Uint8 *)retval + ((num_modes + 1) * sizeof(*retval))); SDL_memcpy(modes, display->fullscreen_modes, num_modes * sizeof(*modes));