Actions
Bug #759
closedundefined behaviour warning in ijg JPEG code
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-06-21
Due date:
% Done:
100%
Estimated time:
Module:
dcmjpeg
Operating System:
Compiler:
Description
The warning is reported by gcc with option -Waggressive-loop-optimizations and seems to only affect the 16-bit version of the JPEG codec:
libijg16/jccolor.c:118:65: warning: iteration 65535u invokes undefined behavior [-Waggressive-loop-optimizations] rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; ^ libijg16/jdmerge.c:108:38: warning: iteration 9396u invokes undefined behavior [-Waggressive-loop-optimizations] RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);
Actions