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

Format warning in traceStream.hpp

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b15
    • CPU:
      x86
    • OS:
      os_x

      Backports

        Description

        (From Staffan Larsen:)

        BTW, I got compilation errors with Xcode 4.6.3 when compiling only the OpenJDK code:

        /Users/staffan/mercurial/jdk9-hs-rt/hotspot/src/share/vm/trace/traceStream.hpp: In member function ‘void TraceStream::print_val(const char*, s8)’:
        /Users/staffan/mercurial/jdk9-hs-rt/hotspot/src/share/vm/trace/traceStream.hpp:69: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘s8’

        Configure flags were:
        configure --disable-zip-debug-info --with-debug-level=release --with-jobs=7 --with-conf-name=openjdk-release --enable-openjdk-only


        I think this is a fix:

        diff --git a/src/share/vm/trace/traceStream.hpp b/src/share/vm/trace/traceStream.hpp
        --- a/src/share/vm/trace/traceStream.hpp
        +++ b/src/share/vm/trace/traceStream.hpp
        @@ -66,7 +66,7 @@
          }

          void print_val(const char* label, s8 val) {
        - _st.print("%s = "INT64_FORMAT, label, val);
        + _st.print("%s = "INT64_FORMAT, label, (int64_t) val);
          }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                drchase David Chase (Inactive)
                Reporter:
                drchase David Chase (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: