restbed icon indicating copy to clipboard operation
restbed copied to clipboard

Failed when restbed has cross compiled for aarch64

Open Frodez opened this issue 4 years ago • 2 comments

When I try to cross compile the restbed from x86_64 to aarch64, there is an error:

restbed/source/corvusoft/restbed/uri.cpp:125:9: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned char’ [-Wnarrowing]

And there is also a warning:

restbed/source/corvusoft/restbed/uri.cpp:150:37: warning: comparison is always true due to limited range of data type [-Wtype-limits]
150 |                   if ( c1 != -1 && c2 != -1 )
      |                                  ~~~^~~~~

Frodez avatar Jul 30 '21 08:07 Frodez

uri.cpp line 125 change to "static const signed char hex_to_dec"

Kevin4ch avatar Aug 19 '21 07:08 Kevin4ch

The compiler error is addressed by PR https://github.com/Corvusoft/restbed/pull/489 (Merged) The compiler warning is addressed by PR https://github.com/Corvusoft/restbed/pull/484 (Open)

Unfortunately the compiler warning is valid, i.e. the code is not working correctly until PR #484 is merged.

axelsommerfeldt avatar Sep 24 '21 13:09 axelsommerfeldt