nsxiv/.woodpecker/CFLAGS
NRK c131b1ed83 fix: -Wsign-compare warnings (#336)
mixing signed and unsigned types in comparison can end up having
unintended results. for example:

	if (-1 < 1U)
		printf("true\n");
	else
		printf("false\n");

previously we silenced these warnings, instead just fix them properly
via necessary casting, and in cases where the value cannot be negative
(e.g width/height members) make them unsigned.

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/336
Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
2022-07-15 22:46:23 +02:00

14 lines
451 B
Plaintext

# vanilla flags
-std=c99 -Wall -pedantic
# optimizations: enables extra warnings and deeper analysis thus catches more errors/warnings
-O3 -flto
# treat warnings as errors
-Werror
# extra flags
-Wextra -Wshadow -Wvla -Wpointer-arith
-Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code
-Wbad-function-cast -Wdeclaration-after-statement
-Wmissing-prototypes -Wstrict-prototypes
# silence
-Wno-unused-parameter -Wno-missing-field-initializers