From c131b1ed83da70fd739aff90ea3e8e829549ff43 Mon Sep 17 00:00:00 2001 From: NRK Date: Fri, 15 Jul 2022 22:46:23 +0200 Subject: 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 --- .woodpecker/CFLAGS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.woodpecker') diff --git a/.woodpecker/CFLAGS b/.woodpecker/CFLAGS index df24be7..57d7d16 100644 --- a/.woodpecker/CFLAGS +++ b/.woodpecker/CFLAGS @@ -10,4 +10,4 @@ -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes # silence --Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers +-Wno-unused-parameter -Wno-missing-field-initializers -- cgit v1.2.3-54-g00ecf