js fails to build on Fedora 22 / gcc 5.1

RESOLVED FIXED in Firefox 41

Status

()

Core
JavaScript Engine
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: tromey, Assigned: tromey)

Tracking

Other Branch
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
I upgraded to Fedora 22, which uses GCC 5.1.1 as its system compiler.
GCC now says:

In file included from /home/tromey/firefox-git/tree-2/obj-x86_64-unknown-linux-gnu/js/src/jsapi-tests/Unified_cpp_js_src_jsapi-tests2.cpp:2:0:
/home/tromey/firefox-git/tree-2/js/src/jsapi-tests/testGCMarking.cpp: In member function ‘void CCWTestTracer::callback(void**, JS::TraceKind)’:
/home/tromey/firefox-git/tree-2/js/src/jsapi-tests/testGCMarking.cpp:21:43: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘JS::TraceKind’ [-Werror=format=]
         printf("kind         = %d\n", kind);
                                           ^
/home/tromey/firefox-git/tree-2/js/src/jsapi-tests/testGCMarking.cpp:22:51: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘JS::TraceKind’ [-Werror=format=]
         printf("expectedKind = %d\n", expectedKind);
                                                   ^


It looks like -Wformat has gotten a bit more pedantic.

Patch to follow.
(Assignee)

Comment 1

3 years ago
Created attachment 8612998 [details] [diff] [review]
add casts for GCC 5.1 -Wformat
(Assignee)

Updated

3 years ago
Attachment #8612998 - Flags: review?(nfitzgerald)
Comment on attachment 8612998 [details] [diff] [review]
add casts for GCC 5.1 -Wformat

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

Thanks!
Attachment #8612998 - Flags: review?(nfitzgerald) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a281ea0a58e6
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.