Browse Source

Clang incorrectly thinks functions are unused in nuklear. Workaround

master
dirkson 3 years ago
parent
commit
ccba2b8a85
  1. 2
      .lvimrc
  2. 5
      meson.build
  3. 1
      src/client-libui/main.c
  4. 4
      src/client-nuklear/main.c
  5. 25575
      src/client-nuklear/nuklear.h

2
.lvimrc

@ -1,6 +1,6 @@
"Stuff you're more likely to edit goes near the top
let s:projstd = '-std=gnu89 -Wall'
let s:projstd = '-std=gnu89 -Wall -Wno-unused-function'
let s:projinc = '-Iinclude -Isrc -Imeson/debug'
let s:projopt = ''

5
meson.build

@ -1,5 +1,5 @@
project('simsecl', 'c', default_options : ['default_library=static', 'c_std=gnu89'])
incdir = include_directories(['src', 'include'])
incdir = include_directories(['src', 'include', 'src/client-nuklear'])
if get_option('buildtype').startswith('debug')
add_project_arguments('-DSIMSECL_DEBUG', language : 'c')
@ -26,8 +26,7 @@ if not meson.is_subproject()
executable('simsecl-client-libui', 'src/client-libui/main.c', include_directories : incdir, dependencies: [deplibui, simsecl_dep])
endif
# executable('simsecl-client-nuklear', 'src/client-nuklear/main.c', include_directories : incdir)
executable('simsecl-client-nuklear', ['src/client-nuklear/main.c'], include_directories : incdir, c_args: '-Wno-unused-function')
executable('simsecl-server', 'src/server/main.c', include_directories : incdir, dependencies: [simsecl_dep])

1
src/client-libui/main.c

@ -74,6 +74,7 @@ char Initialize()
void Cleanup()
{
uiUninit();
}

4
src/client-nuklear/main.c

@ -1,9 +1,13 @@
#define NK_IMPLEMENTATION
#include "nuklear.h"
void MainLoop()
{
//Do somethin'
}
char InitializeSimSeclClient()
{
//if (!something)

25575
src/client-nuklear/nuklear.h
File diff suppressed because it is too large
View File

Loading…
Cancel
Save