Closed Bug 837955 Opened 11 years ago Closed 11 years ago

Fix nsSHistory.cpp logging-related build warnings in opt builds

Categories

(Core :: DOM: Navigation, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In opt builds, we spam these build warnings:
{
docshell/shistory/src/nsSHistory.cpp: In function ‘void {anonymous}::EvictContentViewerForTransaction(nsISHTransaction*)’:

docshell/shistory/src/nsSHistory.cpp:224:5: warning: unused variable ‘_spec’ [-Wunused-variable]

docshell/shistory/src/nsSHistory.cpp: At global scope:

docshell/shistory/src/nsSHistory.cpp:66:1: warning: ‘PRLogModuleInfo* GetSHistoryLog()’ defined but not used [-Wunused-function]
}

This is because we have a bunch of PR_Log-related macros that end up being useless in builds with PR_LOGGING turned off (e.g. opt builds).

Our usual fix for this is to just #define these macros to be empty when PR_LOGGING is off. That fixes this.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Blocks: 837956
Attached patch fixSplinter Review
Attachment #709973 - Flags: review?(bugs)
Attachment #709973 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/5490d8c52ff4
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: