-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build will fail in Linux ARM architectures, Narrowing error at bdlde_base64decoder.cpp #243
Comments
ARM platform is not officially supported by the BDE. |
@osubboo - this issue has nothing to do with ARM, it's just a happy accident that your toolchain is defaulting to signed chars on your platform. It's considered good practice (e.g. MISRA demands that) not to use the char datatype to store numerical values like this; you should always use signed char or unsigned char, depending on your intent. |
Why not use something more specific like: |
Building BDE in a Raspberry Pi 3 Model B, using DietPi with GCC 6.5.0, ARM7hf, will fail since C/C++ datatype
char
is an implementation defined datatype, and in ARM architecture, they are unsigned chars by default.The error stats here, at line 78 of bdlde_base64decoder.cpp
changing to
signed char
instead ofchar
may help, but also requires also changing the static class variables_decoding_p
fromconst char *const bdlde::Base64Decoder::s_decoding_p = decoding;
toconst signed char *const bdlde::Base64Decoder::s_decoding_p = decoding;
Another solution can be is swap from
char
toint
The text was updated successfully, but these errors were encountered: