Project

General

Profile

Bug #759

undefined behaviour warning in ijg JPEG code

Added by Marco Eichelberg 6 months ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2017-06-21
Due date:
% Done:

0%

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);

History

#1 Updated by Marco Eichelberg 6 days ago

  • Target version changed from 3.6.3 to 3.6.4+

Also available in: Atom PDF