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

Denis Mingulov denis at mingulov.com
Mon Mar 30 12:14:37 CEST 2015


Hi,

Just a bug report (as it is impossible to register on TRAC now).

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)
{
...
        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).

-- 
Best Regards,
Denis Mingulov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20150330/7d610543/attachment.html>


More information about the Libwebsockets mailing list