[Libwebsockets] v1.4 compilation problem parsers.c - char_to_hex

Andy Green andy at warmcat.com
Mon Mar 30 12:29:20 CEST 2015



On 30 March 2015 18:14:37 GMT+08:00, Denis Mingulov <denis at mingulov.com> wrote:
>Hi,
>
>Just a bug report (as it is impossible to register on TRAC now).

Sorry... the trac is getting a sustained 6 or 7 spammer login attempts a minute at the moment from some botnet.

>It is impossible to build v.1.4 without other changes on some compilers
>with unsigned default char due to char_to_hex's return type:
>====
>static char char_to_hex(const char c)

What happens if you change this to "static signed char..." ?

I'm afraid you'll have to confirm any 'solution' since I don't have your compiler.

-Andy

>{
>...
>        return -1;
>}
>====
>
>Error is (warning but considered as error due to -Werror):
>
>lib/parsers.c: In function `libwebsocket_parse':
>lib/parsers.c:258: warning: comparison is always false due to limited
>range of data type
>lib/parsers.c:271: warning: comparison is always false due to limited
>range of data type
>
>Those lines - if (char_to_hex(c) < 0).




More information about the Libwebsockets mailing list