CI: Add -Wunused-but-set-variable for Fedora clang

clang 17 warnings that need to be fixed:

hp-option.c:3812:10: error: variable 'errcount' set but not used [-Werror,-Wunused-but-set-variable]
 3812 |   int i, errcount = 0;
      |          ^

In file included from hp3900.c:59:
./hp3900_sane.c:1755:12: error: variable 'nline' set but not used [-Werror,-Wunused-but-set-variable]
 1755 |   SANE_Int nline = 0;
      |            ^

lexmark_low.c:2500:7: error: variable 'blackLineCount' set but not used [-Werror,-Wunused-but-set-variable]
 2500 |   int blackLineCount = 0;
      |       ^

In file included from plustek_pp.c:124:
./plustek-pp_io.c:425:8: error: variable 'dwTime' set but not used [-Werror,-Wunused-but-set-variable]
  425 |         ULong dwTime = 1;
      |               ^

genesys/genesys.cpp:843:19: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  843 |     for (unsigned i = 0;; ++i) {
      |                   ^

After fixing them this commit could be reversed.
merge-requests/855/head
Alex Belkin 2023-11-26 14:32:06 +03:00
rodzic f8c3e23aba
commit 39bf02524f
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -73,7 +73,7 @@ fedora-39-clang:
image: $REGISTRY_HUB:fedora-39-clang
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
MAKE_FLAGS: "CFLAGS=-Werror CXXFLAGS=-Werror"
MAKE_FLAGS: "CFLAGS='-Werror -Wno-error=unused-but-set-variable' CXXFLAGS='-Werror -Wno-error=unused-but-set-variable'"
<<: *compile_definition
alpine-3.18-musl: