[OpenJDK 2D-Dev] RFR: Bug Pending: Build fails to compile jchuff.c

Adam Farley8 adam.farley at uk.ibm.com
Wed Mar 21 12:06:00 UTC 2018


Hi Tom,

Much obliged. :)

Any volunteers to be the 2nd reviewer?

Best Regards

Adam Farley

> Hi Adam,
> 
> this patch looks good. I can sponsor this for you if noone else steps 
up, but we need a second reviewer, preferably one from the 2d project.
> 
> Best Regards, Thomas
> 
> On Wed, Mar 21, 2018 at 12:41 PM, Adam Farley8 <adam.farley at uk.ibm.com> 
wrote:
> Hi All, 
> 
> If committers really don't want this code, we could always try fixing 
the code that the warning 
> is complaining about. 
> 
> ------------------------------ Change 
--------------------------------------- 
> diff --git a/src/java.desktop/share/native/libjavajpeg/jchuff.c 
b/src/java.desktop/share/native/libjavajpeg/jchuff.c 
> --- a/src/java.desktop/share/native/libjavajpeg/jchuff.c 
> +++ b/src/java.desktop/share/native/libjavajpeg/jchuff.c 
> @@ -805,7 +805,7 @@ 
>    for (i = MAX_CLEN; i > 16; i--) { 
>      while (bits[i] > 0) { 
>        j = i - 2;                /* find length of new prefix to be used 
*/ 
> -      while (bits[j] == 0) 
> +      while ((bits[j] == 0) && (j > 0)) 
>          j--; 
> 
>        bits[i] -= 2;             /* remove two symbols */
> ------------------------------ End of Change 
--------------------------------------- 
> 
> Again, it's a small, simple change that fixes a build break on two 
platforms. 
> 
> Either fix will solve this problem. 
> 
> Best Regards
> 
> Adam Farley 
> 
> > Hi All, 
> > 
> > I ask for a committer to add one word to make/lib/Awt2dLibraries.gmk 
to solve a build break. 
> > 
> > We need to go to line 495 and add array-bounds into the list of 
disabled warnings. 
> > 
> > So this: 
> > 
> > DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough 
shift-negative-value, \ 
> > 
> > becomes this: 
> > 
> > DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough 
shift-negative-value array-bounds, \ 
> > 
> > This fixes a build-breaking problem which occurs if you don't disable 
> > errors-as-warnings on zLinux or Linux for ppcle. 
> > 
> > Best Regards 
> > 
> > Adam Farley 
> > 
> > P.S. For further background, see this: 
> > http://mail.openjdk.java.net/pipermail/2d-dev/2018-March/008958.html 
> 
> 

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20180321/2a2403ae/attachment.html>


More information about the 2d-dev mailing list