Page MenuHomeFreeBSD

Fix build on aarch64
ClosedPublic

Authored by adridg on Jan 21 2018, 5:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2024, 10:21 PM
Unknown Object (File)
Feb 19 2024, 10:21 PM
Unknown Object (File)
Feb 19 2024, 10:21 PM
Unknown Object (File)
Feb 19 2024, 4:09 PM
Unknown Object (File)
Jan 27 2024, 9:50 AM
Unknown Object (File)
Jan 23 2024, 8:55 AM
Unknown Object (File)
Dec 6 2023, 8:52 PM
Unknown Object (File)
Nov 19 2023, 5:45 AM
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.