openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
Other
10.18k stars 2.09k forks source link

Build error with current tree #5100

Closed magnumripper closed 2 years ago

magnumripper commented 2 years ago

Running with -Werror:

In file included from encdatavault_common_plug.c:13:
encdatavault_common.h:50:4: error: 'cur_salt' defined but not used [-Werror=unused-variable]
   50 | } *cur_salt;
      |    ^~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [encdatavault_common_plug.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [default] Error 2
magnumripper commented 2 years ago

That struct is used in encdatavault_common_plug.c so I don't quite understand what's with my compiler (gcc 10.3)

magnumripper commented 2 years ago

Oh, it's using the struct salt but not that instance *cur_salt. So it is an actual "bug" if we don't want any warnings. How did not our build bots catch this? Surely some of then run with --enable-werror, no?

claudioandre-br commented 2 years ago

Oh, it's using the struct salt but not that instance *cur_salt. So it is an actual "bug" if we don't want any warnings. How did not our build bots catch this? Surely some of then run with --enable-werror, no?

magnumripper commented 2 years ago

I'm using gcc 10.3.0 though, that's pretty fresh. IIRC I need to drop -Werror only when building with ASan.

claudioandre-br commented 2 years ago

I can't remember which distros use gcc 10. Unfortunately, it looks like gcc 10 has (sort of) been ignored by the major distros.

We are using:

gcc 4.8 (CentOS), gcc 5.4 (Ubuntu 16), gcc 7.2 (fuzzing), gcc 7.4 (Win 2012/2016), gcc 7.5 (ubuntu 18), gcc 9.4 (ubuntu 20) and gcc 11.2 (Azure Windows, Fedora, ...);