[GH-ISSUE #2086] Possibly new warnings when compiling with GCC 6 #1393

Closed
opened 2026-10-14 03:47:44 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @kholia on GitHub (Mar 12, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2086

Originally assigned to: @kholia on GitHub.

$ git rev-parse --short HEAD
95f75a2
$ ./configure
...
Configured for building John the Ripper jumbo:

Target CPU ................................. x86_64 SSE4.1, 64-bit LE
AES-NI support ............................. run-time detection
Target OS .................................. linux-gnu
Cross compiling ............................ no
Legacy arch header ......................... x86-64.h

Optional libraries/features found:
Fuzzing test ............................... no
Experimental code .......................... no
OpenMPI support (default disabled) ......... no
Fork support ............................... yes
OpenMP support ............................. yes (not for fast formats)
CUDA support (default disabled by OpenCL) .. no
OpenCL support ............................. no
Generic crypt(3) format .................... yes
Rexgen (extra cracking mode) ............... no
GMP (PRINCE mode and faster SRP formats) ... yes
PCAP (vncpcap2john and SIPdump) ............ no
Z (pkzip format, gpg2john) ................. yes
BZ2 (gpg2john extra decompression logic) ... no
128-bit integer (faster PRINCE mode) ....... yes
Memory map (share/page large files) ........ yes

Development options (these may hurt performance when enabled):
Memdbg memory debugging settings ........... disabled
AddressSanitizer ("ASan") .................. disabled
UndefinedBehaviorSanitizer ("UbSan") ....... disabled

Install missing libraries to get any needed features that were omitted.

Configure finished.  Now 'make clean && make -s' to compile.
$ make >/dev/null 2>warn.log
...

$ cat warn.log
In file included from MD5_fmt.c:21:0:
cryptmd5_common.h:9:19: warning: ‘smd5_salt_prefix’ defined but not used [-Wunused-const-variable]
 static const char smd5_salt_prefix[] = "{smd5}";
                   ^~~~~~~~~~~~~~~~
cryptmd5_common.h:8:19: warning: ‘apr1_salt_prefix’ defined but not used [-Wunused-const-variable]
 static const char apr1_salt_prefix[] = "$apr1$";
                   ^~~~~~~~~~~~~~~~
cryptmd5_common.h:7:19: warning: ‘md5_salt_prefix’ defined but not used [-Wunused-const-variable]
 static const char md5_salt_prefix[] = "$1$";
                   ^~~~~~~~~~~~~~~
hmailserver_fmt_plug.c: In function ‘hmailserver_valid’:
hmailserver_fmt_plug.c:112:2: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
  get_ptr();
  ^~~~~~~
hmailserver_fmt_plug.c:109:5: note: ...this ‘if’ clause, but it is not
     if ( ciphertext == NULL )
     ^~
pkzip_fmt_plug.c: In function ‘check_inflate_CODE2’:
pkzip_fmt_plug.c:1159:2: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
  return 1;   /* Passed this check! */
  ^~~~~~
pkzip_fmt_plug.c:1156:5: note: ...this ‘if’ clause, but it is not
     if (left > 0)
     ^~
In file included from mask.c:34:0:
encoding_data.h:1183:20: warning: ‘CP1256_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1256_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:1123:20: warning: ‘CP1255_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1255_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:1062:20: warning: ‘CP1254_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1254_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:1001:20: warning: ‘CP1253_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1253_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:940:20: warning: ‘CP1252_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1252_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:881:20: warning: ‘CP1251_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1251_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:820:20: warning: ‘CP1250_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1250_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:768:20: warning: ‘CP868_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP868_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:708:20: warning: ‘CP866_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP866_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:648:20: warning: ‘CP858_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP858_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:587:20: warning: ‘CP852_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP852_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:526:20: warning: ‘CP850_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP850_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:466:20: warning: ‘CP737_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP737_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:408:20: warning: ‘CP720_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP720_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:349:20: warning: ‘CP437_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP437_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:289:20: warning: ‘KOI8_R_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 KOI8_R_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:229:20: warning: ‘ISO_8859_15_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_15_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:167:20: warning: ‘ISO_8859_7_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_7_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:106:20: warning: ‘ISO_8859_2_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_2_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:46:20: warning: ‘ISO_8859_1_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_1_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
options.c: In function ‘opt_init’:
options.c:713:6: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
      if (negative && options.loader.min_cost[i] == 0) {
      ^~
options.c:711:5: note: ...this ‘if’ clause, but it is not
     if (!two_values)
     ^~
In file included from rules.c:24:0:
encoding_data.h:1183:20: warning: ‘CP1256_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1256_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:1123:20: warning: ‘CP1255_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1255_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:1062:20: warning: ‘CP1254_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1254_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:1001:20: warning: ‘CP1253_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1253_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:940:20: warning: ‘CP1252_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1252_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:881:20: warning: ‘CP1251_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1251_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:820:20: warning: ‘CP1250_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP1250_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:768:20: warning: ‘CP868_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP868_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:708:20: warning: ‘CP866_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP866_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:648:20: warning: ‘CP858_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP858_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:587:20: warning: ‘CP852_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP852_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:526:20: warning: ‘CP850_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP850_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:466:20: warning: ‘CP737_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP737_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:408:20: warning: ‘CP720_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP720_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:349:20: warning: ‘CP437_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 CP437_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:289:20: warning: ‘KOI8_R_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 KOI8_R_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:229:20: warning: ‘ISO_8859_15_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_15_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:167:20: warning: ‘ISO_8859_7_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_7_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:106:20: warning: ‘ISO_8859_2_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_2_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoding_data.h:46:20: warning: ‘ISO_8859_1_to_unicode_high128’ defined but not used [-Wunused-const-variable]
 static const UTF16 ISO_8859_1_to_unicode_high128[] = {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar: creating aes.a
$ gcc --version
gcc (GCC) 6.0.0 20160212 (Red Hat 6.0.0-0.11)
Originally created by @kholia on GitHub (Mar 12, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2086 Originally assigned to: @kholia on GitHub. ``` $ git rev-parse --short HEAD 95f75a2 ``` ``` $ ./configure ... Configured for building John the Ripper jumbo: Target CPU ................................. x86_64 SSE4.1, 64-bit LE AES-NI support ............................. run-time detection Target OS .................................. linux-gnu Cross compiling ............................ no Legacy arch header ......................... x86-64.h Optional libraries/features found: Fuzzing test ............................... no Experimental code .......................... no OpenMPI support (default disabled) ......... no Fork support ............................... yes OpenMP support ............................. yes (not for fast formats) CUDA support (default disabled by OpenCL) .. no OpenCL support ............................. no Generic crypt(3) format .................... yes Rexgen (extra cracking mode) ............... no GMP (PRINCE mode and faster SRP formats) ... yes PCAP (vncpcap2john and SIPdump) ............ no Z (pkzip format, gpg2john) ................. yes BZ2 (gpg2john extra decompression logic) ... no 128-bit integer (faster PRINCE mode) ....... yes Memory map (share/page large files) ........ yes Development options (these may hurt performance when enabled): Memdbg memory debugging settings ........... disabled AddressSanitizer ("ASan") .................. disabled UndefinedBehaviorSanitizer ("UbSan") ....... disabled Install missing libraries to get any needed features that were omitted. Configure finished. Now 'make clean && make -s' to compile. ``` ``` $ make >/dev/null 2>warn.log ... $ cat warn.log In file included from MD5_fmt.c:21:0: cryptmd5_common.h:9:19: warning: ‘smd5_salt_prefix’ defined but not used [-Wunused-const-variable] static const char smd5_salt_prefix[] = "{smd5}"; ^~~~~~~~~~~~~~~~ cryptmd5_common.h:8:19: warning: ‘apr1_salt_prefix’ defined but not used [-Wunused-const-variable] static const char apr1_salt_prefix[] = "$apr1$"; ^~~~~~~~~~~~~~~~ cryptmd5_common.h:7:19: warning: ‘md5_salt_prefix’ defined but not used [-Wunused-const-variable] static const char md5_salt_prefix[] = "$1$"; ^~~~~~~~~~~~~~~ hmailserver_fmt_plug.c: In function ‘hmailserver_valid’: hmailserver_fmt_plug.c:112:2: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] get_ptr(); ^~~~~~~ hmailserver_fmt_plug.c:109:5: note: ...this ‘if’ clause, but it is not if ( ciphertext == NULL ) ^~ pkzip_fmt_plug.c: In function ‘check_inflate_CODE2’: pkzip_fmt_plug.c:1159:2: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] return 1; /* Passed this check! */ ^~~~~~ pkzip_fmt_plug.c:1156:5: note: ...this ‘if’ clause, but it is not if (left > 0) ^~ In file included from mask.c:34:0: encoding_data.h:1183:20: warning: ‘CP1256_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1256_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:1123:20: warning: ‘CP1255_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1255_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:1062:20: warning: ‘CP1254_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1254_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:1001:20: warning: ‘CP1253_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1253_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:940:20: warning: ‘CP1252_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1252_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:881:20: warning: ‘CP1251_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1251_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:820:20: warning: ‘CP1250_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1250_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:768:20: warning: ‘CP868_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP868_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:708:20: warning: ‘CP866_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP866_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:648:20: warning: ‘CP858_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP858_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:587:20: warning: ‘CP852_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP852_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:526:20: warning: ‘CP850_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP850_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:466:20: warning: ‘CP737_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP737_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:408:20: warning: ‘CP720_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP720_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:349:20: warning: ‘CP437_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP437_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:289:20: warning: ‘KOI8_R_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 KOI8_R_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:229:20: warning: ‘ISO_8859_15_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_15_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:167:20: warning: ‘ISO_8859_7_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_7_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:106:20: warning: ‘ISO_8859_2_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_2_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:46:20: warning: ‘ISO_8859_1_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_1_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ options.c: In function ‘opt_init’: options.c:713:6: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] if (negative && options.loader.min_cost[i] == 0) { ^~ options.c:711:5: note: ...this ‘if’ clause, but it is not if (!two_values) ^~ In file included from rules.c:24:0: encoding_data.h:1183:20: warning: ‘CP1256_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1256_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:1123:20: warning: ‘CP1255_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1255_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:1062:20: warning: ‘CP1254_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1254_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:1001:20: warning: ‘CP1253_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1253_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:940:20: warning: ‘CP1252_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1252_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:881:20: warning: ‘CP1251_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1251_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:820:20: warning: ‘CP1250_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP1250_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:768:20: warning: ‘CP868_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP868_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:708:20: warning: ‘CP866_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP866_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:648:20: warning: ‘CP858_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP858_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:587:20: warning: ‘CP852_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP852_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:526:20: warning: ‘CP850_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP850_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:466:20: warning: ‘CP737_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP737_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:408:20: warning: ‘CP720_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP720_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:349:20: warning: ‘CP437_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 CP437_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:289:20: warning: ‘KOI8_R_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 KOI8_R_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:229:20: warning: ‘ISO_8859_15_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_15_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:167:20: warning: ‘ISO_8859_7_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_7_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:106:20: warning: ‘ISO_8859_2_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_2_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ encoding_data.h:46:20: warning: ‘ISO_8859_1_to_unicode_high128’ defined but not used [-Wunused-const-variable] static const UTF16 ISO_8859_1_to_unicode_high128[] = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ar: creating aes.a ``` ``` $ gcc --version gcc (GCC) 6.0.0 20160212 (Red Hat 6.0.0-0.11) ```
Author
Owner

@magnumripper commented on GitHub (Mar 12, 2016):

I think the "only" fix is to simply add -Wno-unused-const-variable to certain files (like unicode.c).

<!-- gh-comment-id:195794761 --> @magnumripper commented on GitHub (Mar 12, 2016): I think the "only" fix is to simply add `-Wno-unused-const-variable` to certain files (like unicode.c).
Author
Owner

@magnumripper commented on GitHub (Mar 12, 2016):

Hmm or maybe rules.c and mask.c should not source encoding_data.h at all. Does that happen via unicode.h? Perhaps we can move some things around.

<!-- gh-comment-id:195794926 --> @magnumripper commented on GitHub (Mar 12, 2016): Hmm or maybe rules.c and mask.c should not source encoding_data.h at all. Does that happen via unicode.h? Perhaps we can move some things around.
Author
Owner

@kholia commented on GitHub (Jul 19, 2016):

@magnumripper the following seems to be a valid warning, simply de-indenting the "if block" should get rid of this warning.

$ gcc --version
gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
...
gcc -DAC_BUILT -march=native -mavx2 -DJOHN_AVX2 -c -g -O2 -I/usr/local/include -DARCH_LITTLE_ENDIAN=1   -Wall -Wdeclaration-after-statement -fomit-frame-pointer --param allow-store-data-races=0 -Wno-deprecated-declarations  -Wunused-but-set-variable -std=gnu89 -Wdate-time -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600    -fopenmp  -pthread -DHAVE_HT  -I/usr/local/include -funroll-loops options.c -o options.o
options.c: In function ‘opt_init’:
options.c:706:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (!two_values)
     ^~
options.c:708:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      if (negative && options.loader.min_cost[i] == 0) {
      ^~

Opened https://github.com/magnumripper/JohnTheRipper/pull/2177 to fix this.

<!-- gh-comment-id:233542450 --> @kholia commented on GitHub (Jul 19, 2016): @magnumripper the following seems to be a valid warning, simply de-indenting the "if block" should get rid of this warning. ``` $ gcc --version gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) Copyright (C) 2016 Free Software Foundation, Inc. ``` ``` ... gcc -DAC_BUILT -march=native -mavx2 -DJOHN_AVX2 -c -g -O2 -I/usr/local/include -DARCH_LITTLE_ENDIAN=1 -Wall -Wdeclaration-after-statement -fomit-frame-pointer --param allow-store-data-races=0 -Wno-deprecated-declarations -Wunused-but-set-variable -std=gnu89 -Wdate-time -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -fopenmp -pthread -DHAVE_HT -I/usr/local/include -funroll-loops options.c -o options.o options.c: In function ‘opt_init’: options.c:706:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (!two_values) ^~ options.c:708:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ if (negative && options.loader.min_cost[i] == 0) { ^~ ``` Opened https://github.com/magnumripper/JohnTheRipper/pull/2177 to fix this.
Author
Owner

@magnumripper commented on GitHub (Aug 17, 2016):

@kholia does 5f0a6fc help a little?

<!-- gh-comment-id:240538035 --> @magnumripper commented on GitHub (Aug 17, 2016): @kholia does 5f0a6fc help a little?
Author
Owner

@magnumripper commented on GitHub (Aug 17, 2016):

BTW #2217 also fixed a couple of the warnings.

<!-- gh-comment-id:240573951 --> @magnumripper commented on GitHub (Aug 17, 2016): BTW #2217 also fixed a couple of the warnings.
Author
Owner

@kholia commented on GitHub (Aug 18, 2016):

All the warnings reported in this issue are gone now. I am closing the ticket.

<!-- gh-comment-id:240684861 --> @kholia commented on GitHub (Aug 18, 2016): All the warnings reported in this issue are gone now. I am closing the ticket.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1393
No description provided.