From 9679b58fb2c6d819346658409306121c6552026a Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Thu, 18 May 2023 20:03:30 +0200 Subject: [PATCH] Silence clang warnings --- meson.build | 6 ++++++ meson_options.txt | 2 +- nk_pugl/nk_pugl.h | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index dcaafb4..606d17b 100644 --- a/meson.build +++ b/meson.build @@ -44,6 +44,11 @@ lib_srcs = [ join_paths('pugl', 'src', 'implementation.c') ] +c_args = [ + '-Wno-unknown-warning-option', + '-Wno-null-pointer-subtraction' +] + if host_machine.system() == 'windows' deps += cc.find_library('opengl32') deps += cc.find_library('gdi32') @@ -79,6 +84,7 @@ cousine_regular_ttf = configure_file( if build_examples executable('nk_pugl.gl', [bin_srcs], + c_args : c_args, include_directories : inc_dir, dependencies: nk_pugl_gl, install : false) diff --git a/meson_options.txt b/meson_options.txt index 7dee3ce..fb8a9f9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,4 +10,4 @@ option('build-examples', value : false, yield : true) -option('version', type : 'string', value : '0.1.183') +option('version', type : 'string', value : '0.1.189') diff --git a/nk_pugl/nk_pugl.h b/nk_pugl/nk_pugl.h index 4854797..9ca0ef4 100644 --- a/nk_pugl/nk_pugl.h +++ b/nk_pugl/nk_pugl.h @@ -170,7 +170,7 @@ NK_PUGL_API const char * nk_pugl_paste_from_clipboard(nk_pugl_window_t *win, size_t *len); NK_PUGL_API float -nk_pugl_get_scale(); +nk_pugl_get_scale(void); #ifdef __cplusplus } @@ -199,6 +199,7 @@ extern C { #define NK_IMPLEMENTATION #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #include "nuklear/nuklear.h" #pragma GCC diagnostic pop @@ -417,7 +418,7 @@ _nk_pugl_render_gl2(nk_pugl_window_t *win) } static void -_nk_pugl_glew_init() +_nk_pugl_glew_init(void) { #if defined(__APPLE__) //FIXME @@ -1308,7 +1309,7 @@ nk_pugl_paste_from_clipboard(nk_pugl_window_t *win, size_t *len) } NK_PUGL_API float -nk_pugl_get_scale() +nk_pugl_get_scale(void) { const char *NK_SCALE = getenv("NK_SCALE"); const float scale = NK_SCALE ? atof(NK_SCALE) : 1.f; -- 2.38.5