Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Build will fail in Linux ARM architectures, Narrowing error at bdlde_base64decoder.cpp

Open
#243 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp

Research direction

Start with line 78 of bdlde_base64decoder.cpp and the bdlde::Base64Decoder::s_decoding_p declaration mentioned in the report. Reproduce the build on ARM7hf with GCC 6.5.0 and verify that the BDE build succeeds without the narrowing error.

Written by the indexing model from the issue text.

Description

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

static const char decoding[256] = {
    //  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
    // --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // 00
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // 10
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,  // 20
       52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,  // 30
       -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,  // 40
       15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,  // 50
       -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,  // 60
       41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,  // 70
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // 80
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // 90
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // A0
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // B0
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // C0
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // D0
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // E0
       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,  // F0
};

changing to signed char instead of char may help, but also requires also changing the static class variable s_decoding_p from const char *const bdlde::Base64Decoder::s_decoding_p = decoding; to const signed char *const bdlde::Base64Decoder::s_decoding_p = decoding;

Another solution can be is swap from char to int

Dominant language
C++
Stars
1.9k
Forks
345
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bloomberg/bde

All issues in bloomberg/bde

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.