[glib/wip/pwithnall/wpointer-sign: 2/2] build: Specify -Werror=pointer-sign




commit 6af526b2e37eff41572264beb9ceaf2cb0b5d4f4
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jul 12 14:17:41 2022 +0100

    build: Specify -Werror=pointer-sign
    
    This can catch the wrong pointer being passed to a function argument (in
    some cases), with few false positives.
    
    Spotted while testing !2529.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 meson.build | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/meson.build b/meson.build
index 00d38cbecb..5871976383 100644
--- a/meson.build
+++ b/meson.build
@@ -484,6 +484,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
     '-Werror=declaration-after-statement',
     '-Werror=implicit-function-declaration',
     '-Werror=missing-prototypes',
+    '-Werror=pointer-sign',
   ]
   warning_cxx_args = warning_common_args
   warning_objc_args = warning_c_args


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]