Page MenuHomeFreeBSD

Fix build on aarch64
ClosedPublic

Authored by adridg on Jan 21 2018, 5:24 PM.

Details

Summary

The later chunks (using i2b) are compile fixes on aarch64 (presumably with
clang6 as well). Typical error message reads

readConfig.cpp:407:54: error: non-constant-expression cannot be narrowed 
from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
    unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff };
                               ^~~~~~~~
readConfig.cpp:407:54: note: insert an explicit cast to silence this issue
    unsigned char color[3] = { r & 0xff, g & 0xff, b & 0xff };
                               ^~~~~~~~
                               static_cast<unsigned char>( )

Since it happens in a half-dozen places, introduce a trivial helper function.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14511
Build 14650: arc lint + arc unit

Event Timeline

adridg created this revision.Jan 21 2018, 5:24 PM
tcberner accepted this revision.Jan 21 2018, 7:40 PM

I would bump the PORTREVISION too -- otherwise it looks fine.

This revision is now accepted and ready to land.Jan 21 2018, 7:40 PM
This revision was automatically updated to reflect the committed changes.
novel added a subscriber: novel.Jan 22 2018, 5:19 PM

Thanks for fixing that! You could have added me (maintainer) to reviewers though.
Also, what's the reason to bump PORTREVISION?

@novel You're right, I should have added you to the review. I don't often do fix-it-so-it-builds changes to other people's ports, I got caught up in the whole clang6-fixing party. As for the PORTREVISION bump, well .. PHB says "any change that may change the contents of a package", and us KDE folks interpret that fairly broadly; it's possible this code results in different output executable.