From 9fc7e5bfd94d22ad4fa389e4a929d9d4e000efe4 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 25 Sep 2024 10:28:49 +0200 Subject: [PATCH 1/2] [cmake] default ENABLE_WARNING_VERBOSE=OFF --- cmake/CXXCompilerFlags.cmake | 2 +- cmake/CompilerFlags.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CXXCompilerFlags.cmake b/cmake/CXXCompilerFlags.cmake index cf27b642c..8d132b849 100644 --- a/cmake/CXXCompilerFlags.cmake +++ b/cmake/CXXCompilerFlags.cmake @@ -9,7 +9,7 @@ macro (checkCXXFlag FLAG) endif() endmacro() -option(ENABLE_WARNING_VERBOSE "enable -Weveryting (and some exceptions) for compile" ON) +option(ENABLE_WARNING_VERBOSE "enable -Weveryting (and some exceptions) for compile" OFF) option(ENABLE_WARNING_ERROR "enable -Werror for compile" OFF) if (ENABLE_WARNING_VERBOSE) diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index db0f4efb4..959eba85f 100644 --- a/cmake/CompilerFlags.cmake +++ b/cmake/CompilerFlags.cmake @@ -9,7 +9,7 @@ macro (checkCFlag FLAG) endif() endmacro() -option(ENABLE_WARNING_VERBOSE "enable -Weveryting (and some exceptions) for compile" ON) +option(ENABLE_WARNING_VERBOSE "enable -Weveryting (and some exceptions) for compile" OFF) option(ENABLE_WARNING_ERROR "enable -Werror for compile" OFF) if (ENABLE_WARNING_VERBOSE) From 66b6a90cc75371ed6ef9b5c57275cedd83c0df49 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 25 Sep 2024 10:31:08 +0200 Subject: [PATCH 2/2] [client,x11] fix xf_GetWindowProperty arguments Use BYTE* as argument and cast later to desired type --- client/X11/xf_window.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index a9f933594..b8e0e6cc3 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -502,14 +502,15 @@ static BOOL xf_GetNumberOfDesktops(xfContext* xfc, Window root, unsigned* pval) { unsigned long nitems = 0; unsigned long bytes = 0; - long* prop = NULL; + BYTE* bprop = NULL; WINPR_ASSERT(xfc); WINPR_ASSERT(pval); const BOOL rc = - xf_GetWindowProperty(xfc, root, xfc->_NET_NUMBER_OF_DESKTOPS, 1, &nitems, &bytes, &prop); + xf_GetWindowProperty(xfc, root, xfc->_NET_NUMBER_OF_DESKTOPS, 1, &nitems, &bytes, &bprop); + long* prop = (long*)bprop; *pval = 0; if (!rc) return FALSE; @@ -523,7 +524,7 @@ static BOOL xf_GetCurrentDesktop(xfContext* xfc, Window root) { unsigned long nitems = 0; unsigned long bytes = 0; - long* prop = NULL; + BYTE* bprop = NULL; unsigned max = 0; if (!xf_GetNumberOfDesktops(xfc, root, &max)) @@ -532,8 +533,9 @@ static BOOL xf_GetCurrentDesktop(xfContext* xfc, Window root) return FALSE; const BOOL rc = - xf_GetWindowProperty(xfc, root, xfc->_NET_CURRENT_DESKTOP, 1, &nitems, &bytes, &prop); + xf_GetWindowProperty(xfc, root, xfc->_NET_CURRENT_DESKTOP, 1, &nitems, &bytes, &bprop); + long* prop = (long*)bprop; xfc->current_desktop = 0; if (!rc) return FALSE; @@ -548,10 +550,11 @@ static BOOL xf_GetWorkArea_NET_WORKAREA(xfContext* xfc, Window root) BOOL rc = FALSE; unsigned long nitems = 0; unsigned long bytes = 0; - long* prop = NULL; + BYTE* bprop = NULL; const BOOL status = - xf_GetWindowProperty(xfc, root, xfc->_NET_WORKAREA, INT_MAX, &nitems, &bytes, &prop); + xf_GetWindowProperty(xfc, root, xfc->_NET_WORKAREA, INT_MAX, &nitems, &bytes, &bprop); + long* prop = (long*)bprop; if (!status) goto fail;