Fixes for warning "format not a string literal"

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • None
    • b93

      The gcc build has -Wformat enabled. This warns if the format string in a printf-like function is not a string literal, because if so it can not check that the types of the arguments match the format specifiers.

      In a row of places this warning is suppressed by a PRAGMA.

      This change fixes all but three occurrences of PRAGMA_FORMAT_NONLITERAL_IGNORED

      This especially improves heapInspection.hpp where a static buffer is used to print the format string, which is not multithreading safe.

            Assignee:
            Goetz Lindenmaier
            Reporter:
            Goetz Lindenmaier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: