intel / QATzip

Compression Library accelerated by Intel® QuickAssist Technology
https://developer.intel.com/quickassist
Other
140 stars 51 forks source link

error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] #111

Open cbodley opened 8 months ago

cbodley commented 8 months ago

compilation fails with recent clang versions. clang 14 works, but 16 and 17 fail with:

  CC       libqatzip_la-qatzip.lo
In file included from qatzip.c:67:
./qatzip_internal.h:452:25: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  452 | void streamBufferCleanup();
      |                         ^
      |                          void
qatzip.c:1497:18: error: variable 'sleep_cnt' set but not used [-Werror,-Wunused-but-set-variable]
 1497 |     unsigned int sleep_cnt = 0;
      |                  ^
qatzip.c:2126:18: error: variable 'sleep_cnt' set but not used [-Werror,-Wunused-but-set-variable]
 2126 |     unsigned int sleep_cnt = 0;
      |                  ^
3 errors generated.
make[1]: *** [Makefile:523: libqatzip_la-qatzip.lo] Error 1
GarenJian-Intel commented 8 months ago

Thanks! We will reproduce it, and if it is reproduced, we will plan to fix it.

kshtsk commented 2 months ago

Steps to reproduce are:

make clean ; ./configure CC=clang-17 ; make

or

make clean ; ./configure CC=gcc-13 CFLAGS="-Wstrict-prototypes" ; make

or

make clean ; ./configure CC=gcc-11 CFLAGS="-Wstrict-prototypes" ; make

or

make clean ; ./configure CC=gcc-17 CFLAGS="-Wstrict-prototypes" ; make