Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354316

clang/linux build fails with -Wunused-result warning at XToolkit.c:695:9

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 25
    • client-libs

      <path/to>/jdk/open/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c:695:9: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
       695 | write ( AWT_WRITEPIPE, &wakeUp_char, 1 );
         | ^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.

      Seems to not occur in release builds for some reason. Looking at warning options in the build, I didn't see any differences that seemed relevant.

      Code in question hasn't been touched in forever.

            honkar Harshitha Onkar
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: