Closed
Bug 31548
Opened 25 years ago
Closed 25 years ago
[patch] The define of NS_DEBUG gives me a compilation warning.
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
VERIFIED
WONTFIX
M15
People
(Reporter: jonas.utterstrom, Assigned: dp)
Details
(Keywords: verifyme)
Attachments
(1 file)
In my application, I have both NS_DEBUG and DEBUG define. This gives a
compilation warning when I've included nsDebug.h. So please have a look at the
patch I have attached to this bug.
Reporter | ||
Comment 1•25 years ago
|
||
Assignee | ||
Comment 2•25 years ago
|
||
Yeah your patch looks ok.
Considering that nsDebug.h is the one defining NS_DEBUG, I would like to know
how we can end up with a warning of multiple define.
Can you explain how it is happening ?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Summary: The define of NS_DEBUG gives me a compilation warning. → [patch] The define of NS_DEBUG gives me a compilation warning.
Target Milestone: M15
Reporter | ||
Comment 3•25 years ago
|
||
Well, it doesn't occur in Mozilla. But in my own applications that use the
Mozilla libraries I have to define NS_DEBUG due to the design of nsCOMPtr.
http://lxr.mozilla.org/seamonkey/source/xpcom/base/nsCOMPtr.h#98
Otherwise I will get link errors when using nsCOMPtr in my application. But some
of my code also defines DEBUG, which gives this annoying warning.
And an extra ifdef guard wouldn't do any harm?
Assignee | ||
Comment 4•25 years ago
|
||
Yeah it is harmless. But usually these errors of multiple defines point in the
direction of incorrect usage. Hence my curiosity.
nsCOMPtr.h includes nsDebug.h So if nsDebug.h defined NS_DEBUG in the first
place, things should be just fine.
Instead of defining NS_DEBUG, if you just define DEBUG either in a base header
file or in your build process as we do in mozilla, you should be fine. Right ?
Reporter | ||
Comment 5•25 years ago
|
||
I settle with DEBUG for now, but I think it's a too common used define. I think
that before Mozilla is released something must be done to nsCOMPtr.h so that I
can use the Mozilla release libraries with my debug build application. And of
course the other way around.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 6•25 years ago
|
||
Now that is a damn good suggestion. I will say wont fix and file a separate bug
on that. ok ?
You need to log in
before you can comment on or make changes to this bug.
Description
•