Skip to content

Commit

Permalink
CCAN: update for base64 compile fix on ARM.
Browse files Browse the repository at this point in the history
```
ccan/ccan/base64/base64.c:34:10: error: result of comparison of constant 255 with expression of type 'int8_t' (aka 'signed char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        if (ret == (char)0xff) {
            ~~~ ^  ~~~~~~~~~~
ccan/ccan/base64/base64.c:44:57: error: result of comparison of constant 255 with expression of type 'const signed char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
        return (maps->decode_map[(const unsigned char)b64char] != (char)0xff);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
```

Reported-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Aug 1, 2023
1 parent 3974806 commit 0b23f55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ccan/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CCAN imported from http://ccodearchive.net.

CCAN version: init-2575-g3beff01a
CCAN version: init-2577-g1ae4c432
4 changes: 2 additions & 2 deletions ccan/ccan/base64/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static int8_t sixbit_from_b64(const base64_maps_t *maps,
int8_t ret;

ret = maps->decode_map[(unsigned char)b64letter];
if (ret == (char)0xff) {
if (ret == (int8_t)'\xff') {
errno = EDOM;
return -1;
}
Expand All @@ -41,7 +41,7 @@ static int8_t sixbit_from_b64(const base64_maps_t *maps,

bool base64_char_in_alphabet(const base64_maps_t *maps, const char b64char)
{
return (maps->decode_map[(const unsigned char)b64char] != (char)0xff);
return (maps->decode_map[(const unsigned char)b64char] != (signed char)'\xff');
}

void base64_init_maps(base64_maps_t *dest, const char src[64])
Expand Down

0 comments on commit 0b23f55

Please sign in to comment.