[GH-ISSUE #2217] 2 -Wmisleading-indentation warnings #1477

Closed
opened 2026-10-15 04:18:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @frank-dittrich on GitHub (Aug 16, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2217

hmailserver_fmt_plug.c: In function 'hmailserver_valid':
hmailserver_fmt_plug.c:109:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if ( ciphertext == NULL )
     ^~
hmailserver_fmt_plug.c:112:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  get_ptr();
  ^~~~~~~
pkzip_fmt_plug.c: In function 'check_inflate_CODE2':
pkzip_fmt_plug.c:1160:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (left > 0)
     ^~
pkzip_fmt_plug.c:1163:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  return 1;   /* Passed this check! */
  ^~~~~~

Originally created by @frank-dittrich on GitHub (Aug 16, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2217 ``` hmailserver_fmt_plug.c: In function 'hmailserver_valid': hmailserver_fmt_plug.c:109:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if ( ciphertext == NULL ) ^~ hmailserver_fmt_plug.c:112:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' get_ptr(); ^~~~~~~ pkzip_fmt_plug.c: In function 'check_inflate_CODE2': pkzip_fmt_plug.c:1160:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (left > 0) ^~ pkzip_fmt_plug.c:1163:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' return 1; /* Passed this check! */ ^~~~~~ ```
Author
Owner

@frank-dittrich commented on GitHub (Aug 16, 2016):

Both places: gcc probably got confused by space characters instead of tabs used for indentation.

gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

<!-- gh-comment-id:240023192 --> @frank-dittrich commented on GitHub (Aug 16, 2016): Both places: gcc probably got confused by space characters instead of tabs used for indentation. ``` gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3) Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ```
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#1477
No description provided.