Closed
Bug 1190149
Opened 10 years ago
Closed 10 years ago
Fix -Wformat NULL sentinel warning in GStreamerReader-0.10.cpp
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.37 KB,
patch
|
eflores
:
review+
|
Details | Diff | Splinter Review |
Change NULL sentinel to nullptr to fix this -Wformat warning:
dom/media/gstreamer/GStreamerReader-0.10.cpp:181:11: warning: missing sentinel in function call [-Wformat]
The C++ NULL is the literal 0. In a varargs context where the caller doesn't know the implicit type the callee function will be using to access its arguments, the literal 0 can be interpreted as an integer 0 (32-bits) instead of a NULL pointer (64-bits) on a 64-bit machine, leaving the high bits of the pointer uninitialized.
http://linuxonly.nl/docs/2/2_GCC_4_warnings_about_sentinels.html
Also add some blank lines around some #ifdefs to make them easier to read.
Attachment #8642141 -
Flags: review?(edwin)
Attachment #8642141 -
Flags: review?(edwin) → review+
Keywords: checkin-needed
Comment 3•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•