From b01076caa70127b1f5957f6a35fb6be5fd6970a3 Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Sun, 14 May 2023 21:58:13 +0200 Subject: [PATCH] Fix clang warninngs --- d2tk/frontend.h | 2 +- example/d2tk_fbdev.c | 1 + example/example.h | 2 +- meson.build | 3 ++- meson_options.txt | 2 +- src/frontend_fbdev.c | 8 +------- src/frontend_glfw.c | 2 +- src/frontend_pugl.c | 2 +- 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/d2tk/frontend.h b/d2tk/frontend.h index 5cd1faf..3fd52ec 100644 --- a/d2tk/frontend.h +++ b/d2tk/frontend.h @@ -53,7 +53,7 @@ d2tk_frontend_get_clipboard(d2tk_frontend_t *dpugl, const char **type, size_t *buf_len); D2TK_API float -d2tk_frontend_get_scale(); +d2tk_frontend_get_scale(void); #ifdef __cplusplus } diff --git a/example/d2tk_fbdev.c b/example/d2tk_fbdev.c index 4303ca1..6930c9f 100644 --- a/example/d2tk_fbdev.c +++ b/example/d2tk_fbdev.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "example/example.h" diff --git a/example/example.h b/example/example.h index 2c5383c..935c9af 100644 --- a/example/example.h +++ b/example/example.h @@ -17,7 +17,7 @@ D2TK_API int d2tk_example_init(void); D2TK_API void -d2tk_example_deinit(); +d2tk_example_deinit(void); D2TK_API void d2tk_example_run(d2tk_frontend_t *frontend, d2tk_base_t *base, diff --git a/meson.build b/meson.build index 29937a1..53d1284 100644 --- a/meson.build +++ b/meson.build @@ -259,7 +259,8 @@ c_args = [ '-ffast-math', '-Wno-gnu-zero-variadic-macro-arguments', '-Wno-unknown-attributes', - '-Wno-ignored-attributes' + '-Wno-ignored-attributes', + '-Wno-unknown-warning-option' ] if host_machine.system() == 'windows' diff --git a/meson_options.txt b/meson_options.txt index 45ee07a..f70bbb3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -55,4 +55,4 @@ option('use-fontconfig', value : 'disabled', yield : true) -option('version', type : 'string', value : '0.1.1331') +option('version', type : 'string', value : '0.1.1335') diff --git a/src/frontend_fbdev.c b/src/frontend_fbdev.c index ce60540..4b88d3b 100644 --- a/src/frontend_fbdev.c +++ b/src/frontend_fbdev.c @@ -170,12 +170,6 @@ handle_allocate_error: exit(1); } -static inline void -_d2tk_frontend_close(d2tk_frontend_t *fbdev) -{ - fbdev->done = true; -} - static inline void _d2tk_frontend_expose(d2tk_frontend_t *fbdev) { @@ -812,7 +806,7 @@ d2tk_frontend_get_base(d2tk_frontend_t *fbdev) } D2TK_API float -d2tk_frontend_get_scale() +d2tk_frontend_get_scale(void) { return 1.f; } diff --git a/src/frontend_glfw.c b/src/frontend_glfw.c index ab56c08..f738bc1 100644 --- a/src/frontend_glfw.c +++ b/src/frontend_glfw.c @@ -136,7 +136,7 @@ d2tk_frontend_free(d2tk_frontend_t *dglfw) } D2TK_API float -d2tk_frontend_get_scale() +d2tk_frontend_get_scale(void) { #if 0 float xscale; diff --git a/src/frontend_pugl.c b/src/frontend_pugl.c index 01e93cc..f697cb6 100644 --- a/src/frontend_pugl.c +++ b/src/frontend_pugl.c @@ -534,7 +534,7 @@ d2tk_frontend_free(d2tk_frontend_t *dpugl) } D2TK_API float -d2tk_frontend_get_scale() +d2tk_frontend_get_scale(void) { const char *D2TK_SCALE = getenv("D2TK_SCALE"); const float scale = D2TK_SCALE ? atof(D2TK_SCALE) : 1.f; -- 2.38.5