Closed Bug 788729 Opened 8 years ago Closed 8 years ago

nsDirectoryService.cpp:71:14: warning: variable 'rv' set but not used [-Wunused-but-set-variable]

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

GCC 4.7 (and probably earlier versions as well) build warning:
{
xpcom/io/nsDirectoryService.cpp:71:14: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
}
I believe this is the last build warning in this directory, at least on my machine (with GCC 4.7).

So, I'm marking the directory as warning-free in this patch.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #658619 - Flags: review?(benjamin)
(You might notice that my added line in nsDirectoryService.cpp uses 4 spaces of indentation, vs. the code after it uses 2 spaces.  That 2-space block of code isn't the norm for this file -- the majority of the file uses 4 spaces, and the file's emacs modeline says 4 spaces.)
Attachment #658619 - Flags: review?(benjamin) → review+
Turns out we can't mark this directory as warning-free yet -- Try showed that there was another build warning on OS X 10.8:

> io/nsLocalFileUnix.cpp:1613:13: error: 'lstat64' is deprecated [-Werror,-Wdeprecated-declarations]
https://tbpl.mozilla.org/php/getParsedLog.php?id=15088962&tree=Try

So I removed the Makefile.in FAIL_ON_WARNINGS tweak, and pushed just the nsDirectoryService warning fix.
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3b341b36d42
> Try showed that there was another build warning on OS X 10.8:

er, 10.7 (but probably also 10.8)
https://hg.mozilla.org/mozilla-central/rev/f3b341b36d42
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.