This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch dev/dimmus/test
in repository efl.

View the commit online.

commit 72adde815ea873518d96301cc4bb058dae5094f2
Author: dimmus <dmitri.chudi...@gmail.com>
AuthorDate: Mon Oct 21 14:21:09 2024 +0500

    meson: add compiler flags because life too easy
---
 meson/flags/meson.build | 93 +++++++++++++++++++++++++++++++++++++------------
 1 file changed, 70 insertions(+), 23 deletions(-)

diff --git a/meson/flags/meson.build b/meson/flags/meson.build
index af350e6a2a..4e8776fd5c 100644
--- a/meson/flags/meson.build
+++ b/meson/flags/meson.build
@@ -12,38 +12,74 @@ if COMPILER_IS_GNUCC
   c_compiler_flags += [
     '-Werror=implicit-function-declaration',
     '-Werror=return-type',
+    '-Werror=pointer-arith',
+    '-Werror=pointer-sign',
+    '-Werror=init-self',
+    '-Werror=missing-include-dirs',
+    '-Werror=unused-result',
 
+    '-Wundef',
     '-Waddress',
     '-Wswitch',
+    '-Winline',
+    '-Wshadow',
+    '-Wattributes',
     '-Wpointer-arith',
+    '-Wunused',
     '-Wunused-parameter',
+    '-Wunused-function',
+    '-Wunused-variable',
+    '-Wunused-but-set-parameter',
     '-Wwrite-strings',
     '-Wlogical-op',
     '-Winit-self',
     '-Wuninitialized',
     '-Wmissing-include-dirs',
+    '-Wmissing-braces',
+    '-Wmissing-noreturn',
+    '-Wmissing-parameter-type',
+    '-Wmissing-field-initializers',
     '-Wtype-limits',
-    '-Wformat-signedness',
+    # '-Wformat',
+    # '-Wformat-signedness',
+    # '-Wformat-zero-length',
+    # '-Wformat-nonliteral',
+    # '-Wformat-security',
     '-Wrestrict',
     '-Wnonnull',
     '-Wabsolute-value',
     '-Wchar-subscripts',
     '-Wunknown-pragmas',
     '-Wdiv-by-zero',
-    '-Wunused-parameter',
-    '-Wunused-function',
     '-Wtype-limits',
     '-Wint-in-bool-context',
-    '-Wunused-variable',
     '-Wuninitialized',
     '-Wstringop-overread',
-    '-Wstringop-overflow',
+    '-Wstringop-overflow',  
+    '-Wcast-function-type',
+    '-Wignored-qualifiers',
+    '-Wsign-compare',
+    '-Wshift-negative-value',
+    '-Wempty-body', 
+    '-Wfloat-equal',   
+    '-Wendif-labels',
+    '-Wstrict-aliasing=2',
+    '-Wstrict-prototypes',
+    '-Woverflow',        
+    '-Wimplicit-fallthrough',
+    '-Wimplicit-function-declaration',
+    '-Wmisleading-indentation',         
+    '-Wold-style-declaration',
+    '-Woverride-init',
+    '-Wnested-externs',
+    '-Wduplicated-branches',
+    '-Wduplicated-cond',    
 
     # Disable because it gives warnings for printf() & friends.
     # -Wdouble-promotion -Wno-error=double-promotion
 
     # Use `ATTR_FALLTHROUGH` macro to suppress.
-    '-Wimplicit-fallthrough=5',
+    # '-Wimplicit-fallthrough=5',
   ]
 
   if not APPLE
@@ -100,18 +136,33 @@ if COMPILER_IS_GNUCC
   # flags to undo strict flags
   # C_REMOVE_STRICT_FLAGS
   c_compiler_flags += [
+    '-Wno-old-style-definition',        # many, cannot applied for handler functions
     '-Wno-deprecated-declarations',     # TODO: OpenSSL 3.0 deprecation in eet_cypher.c
     '-Wno-format',                      # too many
     '-Wno-missing-field-initializers',  # too many
+    '-Wno-missing-prototypes',          # too many
+    '-Wno-missing-format-attribute',
+    '-Wno-missing-declarations',
     '-Wno-strict-prototypes',           # too many (no need to support older C-style prototypes)
     '-Wno-vla',                         # too many (ISO C90 forbids variable length array)
-    '-Wno-missing-prototypes',          # too many
     '-Wno-discarded-qualifiers',        # too many
     '-Wno-redundant-decls',             # too many
     '-Wno-shadow',                      # too many
     '-Wno-implicit-fallthrough',        # no efl problems (have external warnings from: static_lib/lz4)
     '-Wno-undef',                       # no efl problems (have external warnings from: scim)
     '-Wno-expansion-to-defined',        # no efl problems (have external warnings from: librsvg)
+    '-Wno-packed',                      # get warning in libdrm (i915_drm.h)
+    '-Wno-switch-enum',                 # too many in eolian
+    '-Wno-switch-default',
+    '-Wno-conversion',                  # a lot here !!!
+    '-Wno-double-promotion',            # a lot here !!!
+    '-Wno-pedantic',                    # due to function casts through (void*) we cannot support -Wpedantic:
+    '-Wno-variadic-macros',             # a lot here !!!
+    '-Wno-bad-function-cast',           # Due to pervasive use of things like _eo_log_obj_report, we do not support building with -Wbad-function-cast.
+    '-Wno-unused-parameter',
+    '-Wno-nonnull-compare',
+    '-Wno-array-bounds',                # TODO: 'outside array bounds' warning in eina_inline_value.x when compile with -O3 (buildtype=release)
+    '-Wno-clobbered'                    # TODO: 'clobbered by longjmp or vfork' warning in eo_lexer.c when compile with -O3 (buildtype=release)
   ]
 
   # CXX_REMOVE_STRICT_FLAGS
@@ -142,19 +193,15 @@ if COMPILER_IS_CLANG
   # C_WARNINGS
   c_compiler_flags += [
     '-Werror=implicit-function-declaration',
+    '-Werror=unguarded-availability-new',
     '-Werror=return-type',
 
-    '-Wno-tautological-compare',
-    '-Wno-unknown-pragmas',
-    '-Wno-char-subscripts',
-    '-Wno-missing-prototypes',
-
     '-Wstrict-prototypes',
     '-Wunused-parameter',
+    '-Wunused-command-line-argument',
     '-Wundef',
     '-Wundef-prefix',
-
-    '-Werror=unguarded-availability-new',
+    '-Wstring-plus-int',
   ]
   # CXX_WARNINGS
   cxx_compiler_flags += [
@@ -164,10 +211,8 @@ if COMPILER_IS_CLANG
     '-Wno-tautological-compare',
     '-Wno-unknown-pragmas',
     '-Wno-char-subscripts',
-
     # We get a lot of these, if its a problem a dev needs to look into it.
     '-Wno-overloaded-virtual',
-
     '-Wno-sign-compare',
     '-Wno-invalid-offsetof',
 
@@ -483,22 +528,24 @@ if COMPILER_IS_CLANG
     '-Wno-unused-parameter',
     '-Wno-unused-variable',
     '-Wno-unused-macros',
-    '-Wno-misleading-indentation',
-
-    '-Wno-missing-variable-declarations',
-    '-Wno-incompatible-pointer-types-discards-qualifiers',
     '-Wno-unused-function',
-    '-Wno-int-to-void-pointer-cast',
+    '-Wno-unused-but-set-variable',
+    '-Wno-misleading-indentation',
+    '-Wno-missing-variable-declarations',
     '-Wno-missing-prototypes',
+    '-Wno-missing-noreturn',
+    '-Wno-incompatible-pointer-types-discards-qualifiers',   
+    '-Wno-int-to-void-pointer-cast',
     '-Wno-duplicate-enum',
     '-Wno-undef',
-    '-Wno-missing-noreturn',
-    '-Wno-unused-but-set-variable',
     '-Wno-deprecated-declarations',
     '-Wno-strict-prototypes',
     '-Wno-bitwise-instead-of-logical',
     '-Wno-implicit-const-int-float-conversion',
     '-Wno-single-bit-bitfield-constant-conversion',
+    '-Wno-tautological-compare',
+    '-Wno-unknown-pragmas',
+    '-Wno-char-subscripts',
   ]
   # CXX_REMOVE_STRICT_FLAGS
   cxx_compiler_flags += [

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to