Closed Bug 740515 Opened 9 years ago Closed 9 years ago

nsView.cpp:990:32: warning: format ‘%p’ expects argument of type ‘void*’, but argument 5 has type ‘nsIFrame*’ [-Wformat]

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch trivial fixSplinter Review
Build warning:
{
nsView.cpp:990:32: warning: format ‘%p’ expects argument of type ‘void*’, but argument 5 has type ‘nsIFrame*’ [-Wformat]
}

...which points to this code:
> 989   fprintf(out, " z=%d vis=%d frame=%p <\n",
> 990           mZIndex, mVis, mFrame);
http://mxr.mozilla.org/mozilla-central/source/view/src/nsView.cpp#989
which was added in bug 703260.

This just wants some static_cast<void*>() love (which is what we use elsewhere to suppress this warning).  Silly [f]printf.
Attachment #610612 - Flags: review?(bugs)
Attachment #610612 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/176df86aa16e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.