Page MenuHomeFreeBSD

Fix build on aarch64
ClosedPublic

Authored by adridg on Jan 21 2018, 5:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 20, 8:01 PM
Unknown Object (File)
Dec 27 2024, 6:11 PM
Unknown Object (File)
Dec 2 2024, 9:44 AM
Unknown Object (File)
Nov 24 2024, 11:07 AM
Unknown Object (File)
Oct 29 2024, 7:36 PM
Unknown Object (File)
Oct 5 2024, 11:29 AM
Unknown Object (File)
Sep 16 2024, 3:42 AM
Unknown Object (File)
Sep 10 2024, 2:37 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.