From 16d33d5d4e6bb28997a15980d92ebd7e4a50f263 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 17 Sep 2018 21:24:26 +0200 Subject: [PATCH] Fix a few minor warnings --- dgl/src/Window.cpp | 3 +++ dgl/src/nanovg/fontstash.h | 4 ++-- dgl/src/pugl/pugl_win.cpp | 4 ++-- dgl/src/sofd/libsofd.c | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index e4c205e2..61d1452b 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -1201,6 +1201,9 @@ bool Window::openFileBrowser(const FileBrowserOptions& options) # else // not implemented return false; + + // unused + (void)options; # endif } #endif diff --git a/dgl/src/nanovg/fontstash.h b/dgl/src/nanovg/fontstash.h index 79e2f82d..5fa86755 100644 --- a/dgl/src/nanovg/fontstash.h +++ b/dgl/src/nanovg/fontstash.h @@ -1226,7 +1226,7 @@ float fonsDrawText(FONScontext* stash, const char* str, const char* end) { FONSstate* state = fons__getState(stash); - unsigned int codepoint; + unsigned int codepoint = 0; unsigned int utf8state = 0; FONSglyph* glyph = NULL; FONSquad q; @@ -1411,7 +1411,7 @@ float fonsTextBounds(FONScontext* stash, float* bounds) { FONSstate* state = fons__getState(stash); - unsigned int codepoint; + unsigned int codepoint = 0; unsigned int utf8state = 0; FONSquad q; FONSglyph* glyph = NULL; diff --git a/dgl/src/pugl/pugl_win.cpp b/dgl/src/pugl/pugl_win.cpp index afbae4b3..67f40581 100644 --- a/dgl/src/pugl/pugl_win.cpp +++ b/dgl/src/pugl/pugl_win.cpp @@ -418,7 +418,7 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) } void -puglGrabFocus(PuglView* view) +puglGrabFocus(PuglView* /*view*/) { // TODO } @@ -474,7 +474,7 @@ puglGetNativeWindow(PuglView* view) } void* -puglGetContext(PuglView* view) +puglGetContext(PuglView* /*view*/) { #ifdef PUGL_HAVE_CAIRO if (view->ctx_type == PUGL_CAIRO) { diff --git a/dgl/src/sofd/libsofd.c b/dgl/src/sofd/libsofd.c index fb262160..914a6e29 100644 --- a/dgl/src/sofd/libsofd.c +++ b/dgl/src/sofd/libsofd.c @@ -1665,7 +1665,7 @@ static void add_place_raw (Display *dpy, const char *name, const char *path) { strcpy (_placelist[_placecnt].name, name); _placelist[_placecnt].flags = 0; - int sw; + int sw = -1; query_font_geometry (dpy, _fib_gc, name, &sw, NULL, NULL, NULL); if (sw > _fib_place_width) { _fib_place_width = sw;