[OpenJDK 2D-Dev] RFR: 8074843: Resolve disabled warnings for libmlib_image and libmlib_image_v

Philip Race philip.race at oracle.com
Thu Jul 28 23:31:34 UTC 2016


Bug: https://bugs.openjdk.java.net/browse/JDK-8074843
Fix: http://cr.openjdk.java.net/~prr/8074843/

Here's a sampling of the warnings that I think covers most, maybe all, 
of the cases
LINUX
mlib_ImageAffine_NN_Bit.c:87:81: error: suggest parentheses around '-' 
in operand of '&' [-Werror=parentheses]
          res = (res & ~(1 << bit)) | (((srcPixelPtr[X >> (MLIB_SHIFT + 
3)] >> (7 - (X >> MLIB_SHIFT) & 7)) & 1) <<
                                                                                  ^
mlib_ImageAffine_NN_Bit.c:153:81: error: suggest parentheses around '-' 
in operand of '&' [-Werror=parentheses]
          res = (res & ~(1 << bit)) | (((srcPixelPtr[X >> (MLIB_SHIFT + 
3)] >> (7 - (X >> MLIB_SHIFT) & 7)) & 1) << bit);

-----------------
mlib_c_ImageCopy.c: In function 'mlib_c_ImageCopy_s16':
mlib_c_ImageCopy.c:439:5: error: suggest parentheses around assignment 
used as truth value [-Werror=parentheses]
      STRIP(pdst, psrc, src_width, src_height, mlib_u16);
      ^
-
MAC ...

mlib_c_ImageCopy.c:331:5: error: using the result of an assignment as a 
condition without parentheses [-Werror,-Wparentheses]
     STRIP(pdst, psrc, src_width, src_height, mlib_u8);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mlib_c_ImageCopy.c:185:11: note: expanded from macro 'STRIP'
     if (j = w & 1)                                              \
         ~~^~~~~~~
mlib_c_ImageCopy.c:331:5: note: place parentheses around the assignment 
to silence this warning\

---


---
SOLARIS
mlib_ImageConv_16ext.c", line 532: statement not reached 
(E_STATEMENT_NOT_REACHED)

This last one was not nice just the ";" was considered a statement
after the {XX; YY; return Z} macro expansion
and turning into "do { {....} } while (0)" did not  help since
then it said "loop terminator not reached - other cases we have
like this have at least a condition in the macro.

-phil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160728/4a36deea/attachment.html>


More information about the 2d-dev mailing list