The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla18

Status

()

Core
Internationalization
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: SADINENI RAVI CHANDRA)

Tracking

(Blocks: 1 bug)

Trunk
mozilla18
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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
(Assignee)

Comment 1

5 years ago
Created attachment 655987 [details] [diff] [review]
patch: removed the variables fmt0, dolpt
Attachment #655987 - Flags: review?(dholbert)
(Reporter)

Comment 2

5 years ago
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+
(Reporter)

Comment 3

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.