Sign of log severity values may get lost, depending on compiler

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Platforms E (01/08/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      LogSeverity::Log().toInt() returns a possibly negative integer, which is cast into a char in several places, with the assumption that char's are signed by default. This assumption is not true for all platforms; GCC on ppc64 and s390x treats char's as unsigned by default. This causes the unit test server_options_test to fail on those platforms.

      The fix is to explicitly declare LogComponentSettings::_minimumLoggedSeverity as a signed char array.

              Assignee:
              Andrew Morrow (Inactive)
              Reporter:
              Bryan Chan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: