HeapAPI.h:51:23: error: C++ requires a type specifier for all declarations when building with 8 unified sources instead of 16

RESOLVED FIXED in mozilla28

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla28
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Open python/mozbuild/mozbuild/backend/recursivemake.py, search for files_per_unification, replace its value (16) with 8.

This is the error you can get then:

../../dist/include/js/HeapAPI.h:51:23: error: C++ requires a type specifier for all declarations
static const uint32_t BLACK = 0;
                      ^~~~~
layout/base/nsCSSColorUtils.cpp:35:20: note: expanded from macro 'BLACK'
#define BLACK      NS_RGB(0, 0, 0)
                   ^~~~~~~~~~~~~~~

Interestingly, nsCSSColorUtils.cpp doesn't even use BLACK.
(Assignee)

Comment 1

5 years ago
There are two ways to fix this:
- Remove the unused macro
- Replace macros with static const variables.
(In reply to Mike Hommey [:glandium] from comment #1)
> There are two ways to fix this:
> - Remove the unused macro
> - Replace macros with static const variables.

We should definitely do the former (for BLACK and WHITE, both of which are unused).

The latter may be worthwhile too, but isn't necessary to fix this bug.
(Assignee)

Comment 3

5 years ago
Created attachment 8341448 [details] [diff] [review]
Remove unused macros in nsCSSColorUtils.cpp (BLACK, WHITE and LIGHT_FACTOR)
Attachment #8341448 - Flags: review?(roc)
(Assignee)

Updated

5 years ago
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/a0b60b2d12f0
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28

Updated

5 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.