Closed Bug 866317 Opened 12 years ago Closed 12 years ago

GCC build warning: ccsip_debug.c: zero-length gnu_printf format string

Categories

(Core :: WebRTC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

(Whiteboard: [WebRTC][blocking-webrtc-][qa-])

Attachments

(1 file, 1 obsolete file)

{ media/webrtc/signaling/src/sipcc/core/sipstack/ccsip_debug.c: zero-length gnu_printf format string } This was introduced yesterday from this cset: http://hg.mozilla.org/mozilla-central/diff/9defb9661f84/media/webrtc/signaling/src/sipcc/core/sipstack/ccsip_debug.c#l1.80 which replaced buginf_msg("\n"); with CSFLogDebug("sipstack", ""); Based on the other replacements there, it looks like we should be passing "\n" as the format-string there, to preserve the old logging behavior. Alternately, if we don't want to pass \n because we already get a newline somewhere under the hood, we can pass "%s", "" -- i.e. use %s as the non-empty format string, and pass "" to make it end up evaluating to the empty string.
Whiteboard: [WebRTC][blocking-webrtc-]
This should preserve the existing behavior, and it silences the warning.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #742644 - Flags: review?(adam)
(In reply to Daniel Holbert [:dholbert] from comment #0) > Alternately, if we don't want to pass \n because we already get a newline > somewhere under the hood, we can pass "%s", "" (This is what I went with, because AFAICT we do get a newline under the hood -- this ends up translating into a call to CSFLogV, which prints a newline, as shown here: https://mxr.mozilla.org/mozilla-central/source/media/webrtc/signaling/src/common/browser_logging/CSFLog.cpp#203 )
I think the offending line can just be removed. The prospect of a blank line really only made sense in the original logging environment that is long, long gone. Thanks.
OK, I'll post a new patch that just nukes the line.
Attachment #742644 - Attachment is obsolete: true
Attachment #742644 - Flags: review?(adam)
Attachment #742653 - Flags: review?(adam)
Attachment #742653 - Flags: review?(adam) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Whiteboard: [WebRTC][blocking-webrtc-] → [WebRTC][blocking-webrtc-][qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: