Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cbodley opened this issue Feb 16, 2024 · 3 comments

Comments

@cbodley
Copy link

cbodley commented Feb 16, 2024

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
Copy link
Contributor

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

@kshtsk
Copy link

kshtsk commented Sep 2, 2024

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

@XingHongChenIntel
Copy link
Contributor

The issue will be fixed on the qatzip 1.3.1 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants