From c80ee9c1fccdf86b4c7c9d5a3b34ec024432e1a3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 22 Apr 2022 15:49:13 -0400 Subject: Strengthen MSVC warnings --- src/implementation.c | 2 +- src/win.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/implementation.c b/src/implementation.c index afc16ab..e7835f6 100644 --- a/src/implementation.c +++ b/src/implementation.c @@ -375,7 +375,7 @@ puglDecodeUTF8(const uint8_t* buf) static inline bool puglMustConfigure(PuglView* view, const PuglConfigureEvent* configure) { - return memcmp(configure, &view->lastConfigure, sizeof(PuglConfigureEvent)); + return !!memcmp(configure, &view->lastConfigure, sizeof(PuglConfigureEvent)); } PuglStatus diff --git a/src/win.c b/src/win.c index 7d4025c..b603b48 100644 --- a/src/win.c +++ b/src/win.c @@ -83,13 +83,13 @@ puglRegisterWindowClass(const char* name) wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); wc.lpszClassName = name; - return RegisterClassEx(&wc); + return !!RegisterClassEx(&wc); } static unsigned puglWinGetWindowFlags(const PuglView* const view) { - const bool resizable = view->hints[PUGL_RESIZABLE]; + const bool resizable = !!view->hints[PUGL_RESIZABLE]; const unsigned sizeFlags = resizable ? (WS_SIZEBOX | WS_MAXIMIZEBOX) : 0u; return (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | -- cgit v1.2.1