1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- // SPDX-License-Identifier: GPL-3.0-or-later
- // Copyright © 2018-2019 Ariadne Devos
- // sHT -- recommended extensive warnings and errror flags for GCC 6.3.0
- # First, a lot of unsorted warnings. Later, some have been categorised.
- # > ./configure CFLAGS="$(sed '/^[*/#]/d' CFLAGS | tr \\n \ )"
- -Wformat=2 -Wignored-attributes -Wno-unused-parameter
- -Wstrict-aliasing=1 -Wstrict-overflow=5
- -Wsuggest-attribute=pure -Wsuggest-attribute=const
- -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Warray-bounds=2 -Wdiscarded-qualifiers
- -Werror=enum-compare -Werror=attributes
- -Werror=endif-labels
- -Werror=empty-body -Werror=logical-not-parentheses
- -Werror=missing-field-initializers -Werror=multichar -Werror=override-init
- -Werror=override-init-side-effects -Werror=nested-externs -Werror=volatile-register-var
- -Werror=pointer-sign -Werror=designated-init -Wunused-macros -Wstrict-prototypes
- -Wold-style-declaration -Wold-style-definition -Wno-long-long -Wdiscarded-qualifiers -Wno-traditional
- -Wno-traditional-conversion -Wno-declaration-after-statement -Wno-shadow -Wno-cast-qual
- -Wno-jump-misses-init -Wno-aggregate-return -Wno-cast-align
- -Wunsafe-loop-optimizations -Waggressive-loop-optimizations -Winline -Wstack-protector -Werror=chkp
- -Werror=double-promotion -Werror=format -Werror=format-zero-length -Werror=format-nonliteral
- -Werror=nonnull-compare -Werror=null-dereference -Werror=init-self -Werror=implicit-int
- -Werror=ignored-qualifiers -Werror=main
- -Werror=missing-include-dirs
- -Werror=return-local-addr
- -Werror=return-type
- -Werror=switch
- -Werror=switch-bool
- -Werror=unused-but-set-parameter
- -Werror=bool-compare -Werror=duplicated-cond -Werror=frame-address
- -Werror=int-conversion -Werror=tautological-compare
- -Werror=float-equal -Werror=free-nonheap-object -Werror=undef -Werror=bad-function-cast
- -Werror=write-strings -Werror=sign-compare -Werror=float-conversion -Werror=sizeof-pointer-memaccess
- -Werror=sizeof-array-argument
- -Wno-builtin-macro-redefined -Werror=packed-bitfield-compat
- -Werror=type-limits -Werror=clobbered -Werror=strict-aliasing
- -Werror=pointer-arith
- -Werror=cast-align
- -Werror=address
- -Werror=int-to-pointer-cast
- -Wsizeof-array-argument -Waddress
- -Wall -Wextra
- -Werror=pointer-to-int-cast
- * Syntax issues
- -Werror=misleading-indentation -Werror=missing-braces -Werror=parentheses
- -Werror=trigraphs -Werror=comment -Werror=missing-declarations
- -Werror=normalized=nfc
- * Pointer issues
- -Werror=strict-overflow -Werror=array-bounds -Werror=strict-aliasing -Werror=overflow
- -Werror=incompatible-pointer-types
- * Bad API usage
- -Werror=memset-transposed-args -Werror=sync-nand -Werror=unknown-pragmas
- -Werror=invalid-memory-model -Werror=format-security -Werror=format-signedness
- -Werror=format-y2k -Werror=nonnull
- * Complicated assembly
- -Werror=vla -Werror=varargs -Werror=trampolines -Wstack-usage=256
- -Wframe-larger-than=256
- * Undefined arithmetic
- -Werror=shift-count-negative -Werror=shift-count-overflow -Werror=shift-negative-value
- -Werror=shift-overflow=2 -Werror=div-by-zero -Werror=sequence-point
- * Reproducable code
- -Werror=date-time
- * Missing code
- -Werror=maybe-uninitialized -Werror=implicit-function-declaration
- * Pointless code
- -Werror=unused-but-set-variable -Werror=unused-function -Werror=unused-label
- -Werror=unused-local-typedefs -Werror=unused-result -Werror=unused-variable
- -Werror=unused-const-variable=2 -Werror=unused-variable -Werror=uninitialized
|