File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,14 @@ if (NUKLEAR_SDL3_EXAMPLES)
4040
4141 # on Visual Studio, set our app as the default project
4242 set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT "nuklear_sdl3_renderer" )
43+
44+ # Enable Warnings
45+ if (MSVC )
46+ target_compile_options (nuklear_sdl3_renderer PRIVATE /W4 /WX)
47+ else ()
48+ target_compile_options (nuklear_sdl3_renderer PRIVATE -Wall -Wextra -Wpedantic -Werror)
49+ endif ()
50+
51+ # SDL3 does not support C89/C90
52+ set_property (TARGET nuklear_sdl3_renderer PROPERTY C_STANDARD 99)
4353endif ()
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ SDL_AppResult SDL_Fail(){
8787}
8888
8989SDL_AppResult SDL_AppInit (void * * appstate , int argc , char * argv []) {
90+ NK_UNUSED (argc );
91+ NK_UNUSED (argv );
9092 if (!SDL_Init (SDL_INIT_VIDEO | SDL_INIT_EVENTS )) {
9193 return SDL_Fail ();
9294 }
@@ -238,6 +240,7 @@ SDL_AppResult SDL_AppIterate(void *appstate) {
238240
239241void SDL_AppQuit (void * appstate , SDL_AppResult result ) {
240242 AppContext * app = (AppContext * )appstate ;
243+ NK_UNUSED (result );
241244
242245 if (app ) {
243246 nk_sdl_shutdown (app -> ctx );
Original file line number Diff line number Diff line change @@ -187,18 +187,18 @@ static void
187187nk_sdl_clipboard_paste (nk_handle usr , struct nk_text_edit * edit )
188188{
189189 const char * text = SDL_GetClipboardText ();
190+ NK_UNUSED (usr );
190191 if (text ) {
191192 nk_textedit_paste (edit , text , nk_strlen (text ));
192193 SDL_free ((void * )text );
193194 }
194- (void )usr ;
195195}
196196
197197static void
198198nk_sdl_clipboard_copy (nk_handle usr , const char * text , int len )
199199{
200200 char * str = 0 ;
201- ( void ) usr ;
201+ NK_UNUSED ( usr ) ;
202202 if (len <= 0 || text == NULL ) return ;
203203 str = SDL_strndup (text , (size_t )len );
204204 if (str == NULL ) return ;
You can’t perform that action at this time.
0 commit comments