Closed Bug 1108934 Opened 10 years ago Closed 10 years ago

Fix -Wunused-const-variable warning-as-error in non-unified build of memory/mozalloc

Categories

(Core :: Memory Allocator, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

1. Remove unused variable `fallible` to fix warning-as-error in non-unified build on OS X. In bug 441324 comment 8, bsmedberg recommended removing the extern declaration of `fallible`, but the cpp file's definition of `fallible` was not removed.

> memory/mozalloc/mozalloc.cpp:227:18: error: unused variable 'fallible' [-Werror,-Wunused-const-variable]

2. Mark mozalloc as FAIL_ON_WARNINGS for clang. mozalloc can't be FAIL_ON_WARNINGS for gcc yet because of the following warning about mozalloc.cpp's definition of abort() not being noreturn. Fixing that warning is nontrivial. mozalloc_abort.h has a comment saying noreturn breaks mozalloc_abort's stack traces on ARM.

> memory/mozalloc/mozalloc_abort.cpp:76:1: warning: 'noreturn' function does return [enabled by default]
Attachment #8533535 - Flags: review?(mh+mozilla)
Attachment #8533535 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/b7895b5e52d5
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: