Files
gentoo/sys-apps/bubblewrap/files/bubblewrap-0.11.2-no-werror.patch
Sam James 74182ca866 sys-apps/bubblewrap: avoid -Werror=*
Especially for middle-end warnings.

Closes: https://bugs.gentoo.org/973225
Signed-off-by: Sam James <sam@gentoo.org>
2026-05-08 11:13:13 +01:00

72 lines
2.1 KiB
Diff

https://bugs.gentoo.org/973225
--- a/meson.build
+++ b/meson.build
@@ -13,28 +13,28 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
common_include_directories = include_directories('.')
# Keep this in sync with ostree, except remove -Wall (part of Meson
-# warning_level 2) and -Werror=declaration-after-statement
+# warning_level 2) and -Wdeclaration-after-statement
add_project_arguments(
cc.get_supported_arguments([
- '-Werror=shadow',
- '-Werror=empty-body',
- '-Werror=strict-prototypes',
- '-Werror=missing-prototypes',
- '-Werror=implicit-function-declaration',
- '-Werror=pointer-arith',
- '-Werror=init-self',
- '-Werror=missing-declarations',
- '-Werror=return-type',
- '-Werror=overflow',
- '-Werror=int-conversion',
- '-Werror=parenthesis',
- '-Werror=incompatible-pointer-types',
- '-Werror=misleading-indentation',
- '-Werror=missing-include-dirs',
- '-Werror=aggregate-return',
+ '-Wshadow',
+ '-Wempty-body',
+ '-Wstrict-prototypes',
+ '-Wmissing-prototypes',
+ '-Wimplicit-function-declaration',
+ '-Wpointer-arith',
+ '-Winit-self',
+ '-Wmissing-declarations',
+ '-Wreturn-type',
+ '-Woverflow',
+ '-Wint-conversion',
+ '-Wparenthesis',
+ '-Wincompatible-pointer-types',
+ '-Wmisleading-indentation',
+ '-Wmissing-include-dirs',
+ '-Waggregate-return',
# Extra warnings specific to bubblewrap
- '-Werror=switch-default',
+ '-Wswitch-default',
'-Wswitch-enum',
# Deliberately not warning about these, ability to zero-initialize
@@ -46,14 +46,14 @@ add_project_arguments(
)
if (
- cc.has_argument('-Werror=format=2')
- and cc.has_argument('-Werror=format-security')
- and cc.has_argument('-Werror=format-nonliteral')
+ cc.has_argument('-Wformat=2')
+ and cc.has_argument('-Wformat-security')
+ and cc.has_argument('-Wformat-nonliteral')
)
add_project_arguments([
- '-Werror=format=2',
- '-Werror=format-security',
- '-Werror=format-nonliteral',
+ '-Wformat=2',
+ '-Wformat-security',
+ '-Wformat-nonliteral',
], language : 'c')
endif