summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2018-09-17 21:24:26 +0200
committerfalkTX <falktx@gmail.com>2018-09-17 21:24:26 +0200
commit16d33d5d4e6bb28997a15980d92ebd7e4a50f263 (patch)
tree55ba03b0316a405e2fbf38bdbf718e548bffcee8
parentb2e7ff2ee4228f27f8bc9b491f5ba9b5dff4ad80 (diff)
Fix a few minor warnings
-rw-r--r--dgl/src/Window.cpp3
-rw-r--r--dgl/src/nanovg/fontstash.h4
-rw-r--r--dgl/src/pugl/pugl_win.cpp4
-rw-r--r--dgl/src/sofd/libsofd.c2
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;