Closed Bug 1107956 Opened 10 years ago Closed 8 years ago

intl/icu/source/i18n/msgfmt.cpp:789:18: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]

Categories

(Core :: Internationalization, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1075758

People

(Reporter: dholbert, Unassigned)

References

Details

Build warning:
{
intl/icu/source/i18n/msgfmt.cpp:789:18: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]
            if (&newFormat == NULL) {
                 ^~~~~~~~~    ~~~~
}

From a comment at the top of this file, it looks like it was originally auto-converted from Java, which makes this bogus comparison a bit more sensible. (It might do something useful in java, but it does not in C++.) A bit similar to bug 1073707.

Anyway, we probably want to just drop the comparison, since it can't fail.
This issue is http://bugs.icu-project.org/trac/ticket/10976.  This was fixed by updating to 55.1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.