[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #52611] Incorrect use of ctype macros?

From: Axel Lin
Subject: [lwip-devel] [bug #52611] Incorrect use of ctype macros?
Date: Thu, 7 Dec 2017 05:20:46 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Follow-up Comment #6, bug #52611 (project lwip):

To make it clear, the previous cast to int is for !LWIP_NO_CTYPE_H case.
so lwip_isdigit/isxdigit/islower/isspace just calls
Since these functions takes int as argument, the cast does not change any
behavior because
the compiler will do that anyway.
It's to silence build warning only. (Some build environment consider warnings
as error)

And I just test for !LWIP_NO_CTYPE_H case:

char c = -2;
printf("test=%d %d %d %d\n", isdigit(c), isxdigit(c), islower(c),

And I got:
test=0 0 0 0

The result looks fine.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]