Closed
Bug 235271
Opened 21 years ago
Closed 21 years ago
nsTimelineService - Warning (Anachronism): Formal argument ... of type extern "C" in call to ...(..., extern "C"...) is being passed something else
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
Attachments
(1 file, 1 obsolete file)
725 bytes,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
SunOS DEATHSTARII 5.9 Generic_112233-11 sun4u sparc SUNW,Ultra-80
CC: Forte Developer 7 C++ 5.4 Patch 111715-05 2003/02/09
nsTimelineService.cpp
Building deps for /export/home/timeless/mozilla/xpcom/ds/nsTimelineService.cpp
"/export/home/timeless/mozilla/xpcom/ds/nsTimelineService.cpp", line 257:
Warning (Anachronism): Formal argument destructor of type extern "C"
void(*)(void*) in call to PR_NewThreadPrivateIndex(unsigned*, extern "C"
void(*)(void*)) is being passed void(*)(void*).
"/export/home/timeless/mozilla/xpcom/ds/nsTimelineService.cpp", line 351:
Warning (Anachronism): Formal argument func of type extern "C" PRStatus(*)() in
call to PR_CallOnce(PRCallOnceType*, extern "C" PRStatus(*)()) is being passed
PRStatus(*)().
"/export/home/timeless/mozilla/xpcom/ds/nsTimelineService.cpp", line 377:
Warning (Anachronism): Formal argument func of type extern "C" PRStatus(*)() in
call to PR_CallOnce(PRCallOnceType*, extern "C" PRStatus(*)()) is being passed
PRStatus(*)().
"/export/home/timeless/mozilla/xpcom/ds/nsTimelineService.cpp", line 394:
Warning (Anachronism): Formal argument func of type extern "C" PRStatus(*)() in
call to PR_CallOnce(PRCallOnceType*, extern "C" PRStatus(*)()) is being passed
PRStatus(*)().
"/export/home/timeless/mozilla/xpcom/ds/nsTimelineService.cpp", line 448:
Warning (Anachronism): Formal argument func of type extern "C" PRStatus(*)() in
call to PR_CallOnce(PRCallOnceType*, extern "C" PRStatus(*)()) is being passed
PRStatus(*)().
Patch tested w/ sun CC on solaris, gcc 2.95 on linux, and msvc7.0 on wXP
Attachment #142016 -
Flags: superreview?(dbaron)
Attachment #142016 -
Flags: review?(dbaron)
Comment on attachment 142016 [details] [diff] [review]
mark definitions as extern "C"
Any compiler that accepted this code does not comply with the C++ standard
(ISO/IEC 14882:1998), section 7.5, clause 7 (the last sentence in the clause).
I *think* what you want is:
extern "C" {
static void ThreadDestruct (void *data);
static PRStatus TimelineInit(void);
};
and then remove the static from the function definition.
Attachment #142016 -
Flags: superreview?(dbaron)
Attachment #142016 -
Flags: superreview-
Attachment #142016 -
Flags: review?(dbaron)
Attachment #142016 -
Flags: review-
that works
Attachment #142016 -
Attachment is obsolete: true
Attachment #142227 -
Flags: superreview?(dbaron)
Attachment #142227 -
Flags: review?(dbaron)
Attachment #142227 -
Flags: superreview?(dbaron)
Attachment #142227 -
Flags: superreview+
Attachment #142227 -
Flags: review?(dbaron)
Attachment #142227 -
Flags: review+
mozilla/xpcom/ds/nsTimelineService.cpp 3.13
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•