Closed Bug 942833 Opened 11 years ago Closed 7 years ago

Compiler warning in jemalloc.c

Categories

(Core :: Memory Allocator, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1226907

People

(Reporter: ddenis, Unassigned)

Details

Attachments

(1 file, 2 obsolete files)

Building on a Mac issues the following warning:

/Users/denis/dev/com.comoyo/ffos/mozilla-central/memory/mozjemalloc/jemalloc.c:450:9: warning: '__DECONST' macro redefined
        ^
/usr/include/sys/cdefs.h:276:9: note: previous definition is here
        ^
(In reply to Denis Dzyubenko [:ddenis] from comment #1)
> Created attachment 8337749 [details] [diff] [review]
> No bug - Fixed compiler warning in jemalloc.c on Mac

Does this really fix the warning? It seems like the warning is about the unconditional #define at line 450: https://hg.mozilla.org/mozilla-central/file/9ac7ed427cd2/memory/mozjemalloc/jemalloc.c#l450
You are absolutely right. I missed that __DECONST is not something jemalloc specific but also declared in /usr/include/sys/cdefs.h
Attachment #8337749 - Attachment is obsolete: true
Attachment #8342345 - Flags: review?(dmajor)
Attachment #8342345 - Flags: review?(dmajor) → review?(mh+mozilla)
Comment on attachment 8342345 [details] [diff] [review]
Fixed compiler warning in jemalloc.c on Mac

Review of attachment 8342345 [details] [diff] [review]:
-----------------------------------------------------------------

Protect it with ifndef, but don't remove it.
Attachment #8342345 - Flags: review?(mh+mozilla) → review-
My patch removes the second definition of the macro - there are two of them in the same file.

Here is the first one: http://dxr.mozilla.org/mozilla-central/source/memory/mozjemalloc/jemalloc.c#315
There is the second one that the attached patch removes: http://dxr.mozilla.org/mozilla-central/source/memory/mozjemalloc/jemalloc.c#450
The first one is in a ifndef MOZ_MEMORY_WINDOWS. The second isn't.
Indeed you are right.
/me puts his brown bag on.
Attachment #8342345 - Attachment is obsolete: true
Flags: needinfo?(mh+mozilla)
Hello,

What is needing in order to help this patch proposal landing ?

Thanks,
This was fixed in bug 1226907.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(mh+mozilla)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: