Closed Bug 589159 Opened 14 years ago Closed 14 years ago

reduce unused variable warnings during build

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 577899

People

(Reporter: blassey, Unassigned)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
In several places in our code we set a return value to a variable but only check it in a debug assert, which produces warnings in release builds.

This patch adds an NS_IF_DEBUG macro which can be used to wrap those assignments, for example:

NS_IF_DEBUG(nsresult rv =) NS_DO_SOMETHING(foo, bar);

It also uses it where appropriate. It passed try for all the builders, there is an orange reftest that I need to investigate though.

Benjamin, I'm not sure if you can review this sort of across the board change or not, let me know.
Attachment #467753 - Flags: review?(benjamin)
This was already discussed and WONTFIXed in bug 577899.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Attachment #467753 - Flags: review?(benjamin) → review-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: