# SDL: Fix -Wmissing-prototypes warning

**URL:** <https://discourse.libsdl.org/t/sdl-fix-wmissing-prototypes-warning/43473>\
**Category:** SDL Commits\
**Created:** [April 5, 2023, 3:42am UTC](https://discourse.libsdl.org/t/sdl-fix-wmissing-prototypes-warning/43473 "2023-04-05T03:42:02Z")\
**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:** [April 5, 2023, 3:42am UTC](https://discourse.libsdl.org/t/sdl-fix-wmissing-prototypes-warning/43473/1 "2023-04-05T03:42:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/ac72cdcf79508a2ff9032429cc1dca0822b0b0f7>
>
> ./src/video/SDL\_video.c:1734:13: warning: no previous prototype for function 'SD…L\_CreateWindowInternal' \[-Wmissing-prototypes\]
> SDL\_Window \*SDL\_CreateWindowInternal(const char \*title, int x, int y, int w, int h, SDL\_Window \*parent, Uint32 flags)
> ^
> ./src/video/SDL\_video.c:1734:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> SDL\_Window \*SDL\_CreateWindowInternal(const char \*title, int x, int y, int w, int h, SDL\_Window \*parent, Uint32 flags)
> ^
> static

```diff
From ac72cdcf79508a2ff9032429cc1dca0822b0b0f7 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 5 Apr 2023 05:38:27 +0200
Subject: [PATCH] Fix -Wmissing-prototypes warning

./src/video/SDL_video.c:1734:13: warning: no previous prototype for function 'SDL_CreateWindowInternal' [-Wmissing-prototypes]
SDL_Window *SDL_CreateWindowInternal(const char *title, int x, int y, int w, int h, SDL_Window *parent, Uint32 flags)
            ^
./src/video/SDL_video.c:1734:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
SDL_Window *SDL_CreateWindowInternal(const char *title, int x, int y, int w, int h, SDL_Window *parent, Uint32 flags)
^
static
---
 src/video/SDL_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index aaf99ab18a0b..ffd4f96a0e65 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -1731,7 +1731,7 @@ static int SDL_DllNotSupported(const char *name)
     return SDL_SetError("No dynamic %s support in current SDL video driver (%s)", name, _this->name);
 }
 
-SDL_Window *SDL_CreateWindowInternal(const char *title, int x, int y, int w, int h, SDL_Window *parent, Uint32 flags)
+static SDL_Window *SDL_CreateWindowInternal(const char *title, int x, int y, int w, int h, SDL_Window *parent, Uint32 flags)
 {
     SDL_Window *window;
     Uint32 type_flags, graphics_flags;

```
