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

gtk3_interface.c compilation error on Ubuntu 12.10

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Subcomponent:
    • Resolved In Build:
      b120

      Description

      On my Ubuntu system the GTK code fails to build :-
      ------------
      ERROR: Build failed for target 'default (exploded-image)' in configuration 'linux-x86_64-normal-server-release' (exit code 2)
      === Output from failing command(s) repeated here ===
      * For target support_native_java.desktop_libawt_xawt_gtk3_interface.o:
      /home/prrace/jdk9-client/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c: In function ‘get_integer_property’:
      /home/prrace/jdk9-client/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c:2550:19: error: initialization makes integer from pointer without a cast [-Werror]
      /home/prrace/jdk9-client/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c: In function ‘get_boolean_property’:
      /home/prrace/jdk9-client/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c:2557:19: error: initialization makes integer from pointer without a cast [-Werror]
      cc1: all warnings being treated as errors
      === End of repeated output ===
      ------

      It is due to this usage
      gint intval = NULL;
      I had pointed this out during the review process and asked
      that it be fixed but it appears it was not.

      It was noted that some other file already does this but the
      difference is the include file sequence.

      It appears NULL is being #defined to (void*)0 in this case for me
      and some different include sequence in the other file is (I suppose) causing it to be #defined (0) in my case.

      There is no reason not to make this change and it makes the
      annoying build problem go away. Without this being fixed I always need
      to disable-warnings-as-errors.

        Attachments

          Activity

            People

            • Assignee:
              prr Philip Race
              Reporter:
              prr Philip Race
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: