Skip to content
Snippets Groups Projects
Commit 74b66562 authored by Simon McVittie's avatar Simon McVittie
Browse files

build: Split out warning flags that are only supported for C


For completeness, I've added separate lists of flags that are only
supported for C++, although there are none yet.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent c0608795
No related branches found
No related tags found
1 merge request!82Enable and squash compiler warnings
......@@ -54,7 +54,7 @@ endif
glslang_validator = find_program('glslangValidator', required : true)
warning_cflags = [
warning_flags = [
'-Wall',
'-Wextra',
'-Warray-bounds',
......@@ -65,19 +65,14 @@ warning_cflags = [
'-Wformat-nonliteral',
'-Wformat-security',
'-Wformat=2',
'-Wimplicit-function-declaration',
'-Winit-self',
'-Winline',
'-Wjump-misses-init',
'-Wlogical-op',
'-Wmissing-declarations',
'-Wmissing-format-attribute',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wnull-dereference',
'-Wold-style-definition',
'-Wpacked',
'-Wpointer-arith',
'-Wredundant-decls',
......@@ -85,20 +80,34 @@ warning_cflags = [
'-Wreturn-type',
'-Wshadow',
'-Wstrict-aliasing',
'-Wstrict-prototypes',
'-Wswitch-default',
'-Wswitch-enum',
'-Wundef',
'-Wunused-but-set-variable',
'-Wwrite-strings',
]
no_warning_cflags = [
'declaration-after-statement',
warning_cflags = warning_flags + [
'-Wimplicit-function-declaration',
'-Wjump-misses-init',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
'-Wstrict-prototypes',
]
warning_cxxflags = warning_flags + [
]
no_warning_flags = [
'missing-field-initializers',
'sign-compare',
'unused-local-typedefs',
'unused-parameter',
]
no_warning_cflags = no_warning_flags + [
'declaration-after-statement',
]
no_warning_cxxflags = no_warning_flags + [
]
c_compiler = meson.get_compiler('c')
supported_warning_cflags = c_compiler.get_supported_arguments(warning_cflags)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment