Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266167 Clean up GCC 11 warnings
  3. JDK-8266174

-Wmisleading-indentation happens in libmlib_image sources

    XMLWordPrintable

Details

    Backports

      Description

        We can see following warnings in mlib_ImageAffine_BC_S32.c, mlib_ImageAffine_BL_S32.c, mlib_ImageScanPoly.c . They are caused by indentation in mlib_ImageAffine.h .


        In file included from /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine_BC_S32.c:65:
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine_BC_S32.c: In function 'mlib_ImageAffine_s32_1ch_bc':
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h:216:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
          216 | if (SRC <= MLIB_S32_MIN) \
              | ^~
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h:223:20: note: in expansion of macro 'SAT_32'
          223 | #define SAT32(DST) SAT_32(DST, val0)
              | ^~~~~~
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine_BC_S32.c:77:23: note: in expansion of macro 'SAT32'
           77 | #define STORE(res, x) SAT32(res)
              | ^~~~~
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine_BC_S32.c:202:9: note: in expansion of macro 'STORE'
          202 | STORE(dstPixelPtr[0], val0);
              | ^~~~~
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine_BC_S32.c:202:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
          202 | STORE(dstPixelPtr[0], val0);
              | ^~~~~~~~~~~
        /home/ysuenaga/git-forked/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageAffine.h:218:5: note: in definition of macro 'SAT_32'
          218 | DST = (mlib_s32) SRC
              | ^~~

        Attachments

          Issue Links

            Activity

              People

                ysuenaga Yasumasa Suenaga
                ysuenaga Yasumasa Suenaga
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: