Note: There are a few cases of duplicates in user autocompletion which are being worked on.

LOG_SCOPE macro in ImageLogging.h doesn't do what it looks like

RESOLVED FIXED in mozilla13

Status

()

Core
ImageLib
RESOLVED FIXED
11 years ago
6 years ago

People

(Reporter: dbaron, Assigned: jrmuizel)

Tracking

1.8 Branch
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
the LOG_SCOPE and LOG_SCOPE_WITH_PARAM macros don't actually use __LINE__ the way they look like they do; thus builds with -Wshadow produce warnings:

/builds/1.8/mozilla/modules/libpr0n/src/imgLoader.cpp:409: warning: declaration of ‘LOG_SCOPE_TMP_VAR__LINE__’ shadows a previous local
/builds/1.8/mozilla/modules/libpr0n/src/imgLoader.cpp:266: warning: shadowed declaration is here
/builds/1.8/mozilla/modules/libpr0n/src/imgLoader.cpp:480: warning: declaration of ‘LOG_SCOPE_TMP_VAR__LINE__’ shadows a previous local
/builds/1.8/mozilla/modules/libpr0n/src/imgLoader.cpp:266: warning: shadowed declaration is here


or

/builds/1.8/mozilla/modules/libpr0n/src/imgRequest.cpp:809: warning: declaration of ‘LOG_SCOPE_TMP_VAR__LINE__’ shadows a previous local
/builds/1.8/mozilla/modules/libpr0n/src/imgRequest.cpp:804: warning: shadowed declaration is here
/builds/1.8/mozilla/modules/libpr0n/src/imgRequest.cpp:825: warning: declaration of ‘LOG_SCOPE_TMP_VAR__LINE__’ shadows a previous local
/builds/1.8/mozilla/modules/libpr0n/src/imgRequest.cpp:809: warning: shadowed declaration is here

and would presumably produce an error if two were used in the same scope.  If that's not actually ever needed, the __LINE__ stuff should be removed; otherwise it should use the nested macros that are needed to make this work, such as those in AUTO_MARK_JSVAL and AUTO_MARK_JSVAL_HELPER* in:
http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpcprivate.h#3454

Updated

10 years ago
Assignee: pavlov → nobody
QA Contact: imagelib
(Assignee)

Comment 1

6 years ago
Created attachment 592248 [details] [diff] [review]
expand __LINE__ before pasting
Attachment #592248 - Flags: review?(justin.lebar+bug)
Comment on attachment 592248 [details] [diff] [review]
expand __LINE__ before pasting

r=me, but please undef the new APPEND_LINE_NUMBER* macros.
Attachment #592248 - Flags: review?(justin.lebar+bug) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/006eebde1259
Assignee: nobody → jmuizelaar
Target Milestone: --- → mozilla13

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/006eebde1259
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.