Page MenuHomeFreeBSD

Fix build on aarch64
ClosedPublic

Authored by adridg on Jan 21 2018, 5:24 PM.
Tags
None
Referenced Files
F115382306: D14008.id38281.diff
Wed, Apr 23, 5:42 AM
Unknown Object (File)
Sat, Apr 19, 8:00 PM
Unknown Object (File)
Sat, Apr 19, 5:54 PM
Unknown Object (File)
Sat, Apr 19, 4:53 PM
Unknown Object (File)
Sat, Apr 19, 3:53 PM
Unknown Object (File)
Sat, Apr 19, 1:47 PM
Unknown Object (File)
Sat, Apr 19, 12:43 PM
Unknown Object (File)
Sat, Apr 19, 12:38 PM
Subscribers

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.

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.