Closed Bug 1089370 Opened 10 years ago Closed 10 years ago

content/base/src/nsContentUtils.cpp:4144:11: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: alex_y_xu, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

20:44.07 /home/alex/gecko-dev/content/base/src/nsContentUtils.cpp:4144:11: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
20:44.08     if (!&tagName) {
20:44.08         ~ ^~~~~~~
20:44.08 1 error generated.
20:44.10 In the directory  /home/alex/gecko-dev/obj-x86_64-unknown-linux-gnu/content/base/src
20:44.10 The following command failed to execute properly:
20:44.10 /usr/bin/ccache clang++ -o nsContentUtils.o -c -I[everything] -fPIC -Qunused-arguments -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MP -MF .deps/nsContentUtils.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Werror=endif-labels -Werror=int-to-pointer-cast -Werror=missing-braces -Werror=pointer-arith -Werror=return-type -Werror=sequence-point -Werror=unused-label -Werror=trigraphs -Werror=type-limits -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-error=uninitialized -Wno-error=deprecated-declarations -O2 -pipe -march=native -fstack-protector -march=native -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -ggdb -Xclang -load -Xclang ../../../build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fomit-frame-pointer -Werror /home/alex/gecko-dev/content/base/src/nsContentUtils.cpp
20:44.10 /home/alex/gecko-dev/config/rules.mk:948: recipe for target 'nsContentUtils.o' failed
20:44.10 gmake[5]: *** [nsContentUtils.o] Error 1
This triggers an undefined-bool-conversion warning in recent LLVM. The
dereference is safe because nsAutoTArray is infallible.
Attachment #8511658 - Flags: review?(jst)
Assignee: nobody → Ms2ger
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Blocks: buildwarning
Attachment #8511658 - Flags: review?(jst) → review+
https://hg.mozilla.org/mozilla-central/rev/7e8eda44373c
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: