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

XMLWordPrintable

    • b25

      <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.

            Assignee:
            Harshitha Onkar
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: