arun11299 / cpp-jwt

JSON Web Token library for C++
MIT License
393 stars 112 forks source link

Narrowing errors compiling for ARM #36

Closed mhfrantz closed 6 years ago

mhfrantz commented 6 years ago

When compiling for ARM, we get errors like this:

cpp-jwt/include/jwt/base64.hpp:179:4: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

The issue is described here: https://stackoverflow.com/questions/31634962/narrowing-conversion-from-int-to-char-inside-for-legal-values-when-cro

The solution is to use signed char in places where you want to make sure the values are interpreted as signed integers.

arun11299 commented 6 years ago

Thanks. Fixed it.