Last Comment Bug 720804 - GCC 4.6 build warning: nsTextFormatter.cpp:855:22: warning: variable ‘fmt0’ set but not used [-Wunused-but-set-variable]
: GCC 4.6 build warning: nsTextFormatter.cpp:855:22: warning: variable ‘fmt0’ s...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla18
Assigned To: SADINENI RAVI CHANDRA
:
Mentors:
Depends on:
Blocks: buildwarning 102690
  Show dependency treegraph
 
Reported: 2012-01-24 12:47 PST by Daniel Holbert [:dholbert] (mostly OOTO until Aug 9th)
Modified: 2012-09-11 06:58 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch: removed the variables fmt0, dolpt (823 bytes, patch)
2012-08-28 07:10 PDT, SADINENI RAVI CHANDRA
dholbert: review+
benjamin: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] (mostly OOTO until Aug 9th) 2012-01-24 12:47:20 PST
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.
Comment 1 SADINENI RAVI CHANDRA 2012-08-28 07:10:01 PDT
Created attachment 655987 [details] [diff] [review]
patch: removed the variables fmt0, dolpt
Comment 2 Daniel Holbert [:dholbert] (mostly OOTO until Aug 9th) 2012-08-28 08:26:47 PDT
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.
Comment 3 Daniel Holbert [:dholbert] (mostly OOTO until Aug 9th) 2012-09-10 23:55:53 PDT
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
Comment 4 Ed Morley [:emorley] 2012-09-11 06:58:59 PDT
https://hg.mozilla.org/mozilla-central/rev/15cf1eba0f0a

Note You need to log in before you can comment on or make changes to this bug.