Actions
Bug #2546
openenigma.c:2807: bad compare ?
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/10/2018
Due date:
% Done:
0%
Estimated time:
Description
enigma.c:2807:45: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
Source code is
unsigned long long nRecSizeCut = nRecSize < 0 ? -1 : 0;
but
unsigned long long nRecSize = -1;
Maybe better code
unsigned long long nRecSizeCut = (nRecSize == (unsigned long long) -1) ? -1 : 0;
Many duplicates:
enigma.c:2830:22: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
enigma.c:2835:22: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
enigma.c:2845:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
...
Suggest add gcc compiler flag -Wtautological-compare to builds.
No data to display
Actions