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

Build failure with -Werror=maybe-uninitialized in libjli/java.c with GCC8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • tools
    • b24

      /data/jdk/src/java.base/share/native/libjli/java.c: In function 'JLI_Launch':
      /data/jdk/src/java.base/share/native/libjli/java.c:1405:16: error: 'arg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
                      ^~~~~~~~~~~~~~~~~
      /data/jdk/src/java.base/share/native/libjli/java.c:1208:11: note: 'arg' was declared here
           char *arg;
                 ^~~
      cc1: all warnings being treated as errors
      gmake[3]: *** [lib/CoreLibraries.gmk:169: /data/jdk/build/linux-x86_64-server-fastdebug/support/native/java.base/libjli/java.o] Error 1
      gmake[3]: *** Waiting for unfinished jobs....
      gmake[2]: *** [make/Main.gmk:199: java.base-libs] Error 2

      ERROR: Build failed for target 'images' in configuration 'linux-x86_64-server-fastdebug' (exit code 2)

      === Output from failing command(s) repeated here ===
      * For target support_native_java.base_libjli_java.o:
      /data/jdk/src/java.base/share/native/libjli/java.c: In function 'JLI_Launch':
      /data/jdk/src/java.base/share/native/libjli/java.c:1405:16: error: 'arg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               mode = IsSourceFile(arg) ? LM_SOURCE : LM_CLASS;
                      ^~~~~~~~~~~~~~~~~
      /data/jdk/src/java.base/share/native/libjli/java.c:1208:11: note: 'arg' was declared here
           char *arg;
                 ^~~
      cc1: all warnings being treated as errors

            jiefu Jie Fu
            jiefu Jie Fu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: