Closed Bug 1647774 Opened 4 years ago Closed 4 years ago

clang-11 -Werror,-Wnon-c-typedef-for-linkage about FNCMapEntry in gfxFT2FontList.cpp

Categories

(Core :: Graphics, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: away, Assigned: away)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

[task 2020-06-23T15:46:22.487Z] 15:46:22    ERROR -  /builds/worker/checkouts/gecko/gfx/thebes/gfxFT2FontList.cpp:809:17: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -    typedef struct : public PLDHashEntryHdr {
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -                  ^
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -                   FNCMapEntry
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -  /builds/worker/checkouts/gecko/gfx/thebes/gfxFT2FontList.cpp:809:20: note: type is not C-compatible due to this base class
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -    typedef struct : public PLDHashEntryHdr {
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -                     ^~~~~~~~~~~~~~~~~~~~~~
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -  /builds/worker/checkouts/gecko/gfx/thebes/gfxFT2FontList.cpp:816:5: note: type is given name 'FNCMapEntry' for linkage purposes by this typedef declaration
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -    } FNCMapEntry;
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -      ^
[task 2020-06-23T15:46:22.487Z] 15:46:22     INFO -  1 error generated.
Summary: clang-11 -Werror,-Wnon-c-typedef-for-linkage about FNCMapEntry in → clang-11 -Werror,-Wnon-c-typedef-for-linkage about FNCMapEntry in gfxFT2FontList.cpp

clang-11 is unhappy about this typedef being anonymous when it's not C-compatible due to the base class. This could be fixed by adding a tag, but looking around at other subclasses of PLDHashEntryHdr, most instances just define the struct in the C++ way.

Pushed by dmajor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c214953fc30a Fix a clang-11 error about FNCMapEntry in gfxFT2FontList.cpp r=jfkthame
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: