cc: enable more C warnings (#7401)

pull/7402/head
ka-weihe 2020-12-18 22:33:51 +01:00 committed by GitHub
parent b61a936fb8
commit 5788d6d768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -241,10 +241,11 @@ fn (mut v Builder) cc() {
// '-Werror', // '-Werror',
// TODO : try and remove the below workaround options when the corresponding // TODO : try and remove the below workaround options when the corresponding
// warnings are totally fixed/removed // warnings are totally fixed/removed
mut args := [v.pref.cflags, '-std=gnu99', '-Wall', '-Wextra', '-Wno-unused-variable', '-Wno-unused-parameter', mut args := [v.pref.cflags, '-std=gnu99', '-Wall', '-Wextra', '-Wno-unused', '-Wno-missing-braces',
'-Wno-unused-result', '-Wno-unused-function', '-Wno-missing-braces', '-Wno-unused-label', '-Wshadow', '-Walloc-zero', '-Wcast-qual', '-Wdate-time', '-Wduplicated-branches', '-Wduplicated-cond', '-Wformat=2',
'-Wno-unused', '-Winit-self', '-Winvalid-pch', '-Wjump-misses-init', '-Wlogical-op', '-Wmultichar', '-Wnested-externs',
] '-Wnull-dereference', '-Wpacked', '-Wpointer-arith', '-Wshadow', '-Wswitch-default', '-Wswitch-enum',
'-Wno-unused-parameter', '-Wno-unknown-warning-option', '-Wno-format-nonliteral']
if v.pref.os == .ios { if v.pref.os == .ios {
args << '-framework Foundation' args << '-framework Foundation'
args << '-framework UIKit' args << '-framework UIKit'