1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cc: enable more C warnings (#7401)

This commit is contained in:
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

View File

@ -241,10 +241,11 @@ fn (mut v Builder) cc() {
// '-Werror',
// TODO : try and remove the below workaround options when the corresponding
// warnings are totally fixed/removed
mut args := [v.pref.cflags, '-std=gnu99', '-Wall', '-Wextra', '-Wno-unused-variable', '-Wno-unused-parameter',
'-Wno-unused-result', '-Wno-unused-function', '-Wno-missing-braces', '-Wno-unused-label', '-Wshadow',
'-Wno-unused',
]
mut args := [v.pref.cflags, '-std=gnu99', '-Wall', '-Wextra', '-Wno-unused', '-Wno-missing-braces',
'-Walloc-zero', '-Wcast-qual', '-Wdate-time', '-Wduplicated-branches', '-Wduplicated-cond', '-Wformat=2',
'-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 {
args << '-framework Foundation'
args << '-framework UIKit'