Closed Bug 720804 Opened 12 years ago Closed 12 years ago

GCC 4.6 build warning: nsTextFormatter.cpp:855:22: warning: variable ‘fmt0’ set but not used [-Wunused-but-set-variable]

Categories

(Core :: Internationalization, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: dholbert, Assigned: ravicat2013)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When building mozilla-central with GCC 4.6, I get:
{
nsTextFormatter.cpp: In function ‘int dosprintf(SprintfState*, const PRUnichar*, __va_list_tag*)’:
nsTextFormatter.cpp:855:22: warning: variable ‘fmt0’ set but not used [-Wunused-but-set-variable]
nsTextFormatter.cpp:868:22: warning: variable ‘dolPt’ set but not used [-Wunused-but-set-variable]
}

These variables' last usages were removed in a cleanup patch in 2001, for bug 102690...
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsTextFormatter.cpp&branch=&root=/cvsroot&subdir=mozilla/xpcom/ds/Attic&command=DIFF_FRAMESET&rev1=1.8&rev2=1.9
...but the variables themselves were left in.  Looks like we can just get rid of them, since they aren't used for anything.
Assignee: nobody → ravicat2013
Status: NEW → ASSIGNED
Attachment #655987 - Flags: review?(dholbert)
Comment on attachment 655987 [details] [diff] [review]
patch: removed the variables fmt0, dolpt

Thanks for the patch -- this looks great!

Since this is in /xpcom, this technically needs review from an XPCOM reviewer.

According to https://hg.mozilla.org/mozilla-central/filelog/118cc431d56f/xpcom/glue/nsTextFormatter.cpp , bsmedberg is the only one who's reviewed changes to this file for a while, so I'm tagging him for a quick thumbs-up.
Attachment #655987 - Flags: review?(dholbert)
Attachment #655987 - Flags: review?(benjamin)
Attachment #655987 - Flags: review+
Attachment #655987 - Flags: review?(benjamin) → review+
Thanks for the patch! In the future, it'd be great if you could prepare the patch as described at https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in , that would make it easier for people to check your patch in.

Landed patch:
  https://hg.mozilla.org/integration/mozilla-inbound/rev/15cf1eba0f0a
https://hg.mozilla.org/mozilla-central/rev/15cf1eba0f0a
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: