[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
isdigit/isxdigit/islower/isspace.
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),
isspace(c));
And I got:
test=0 0 0 0
The result looks fine.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?52611>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Mike Kleshov, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Dirk Ziegelmeier, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Stian Sebastian Skjelstad, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Mike Kleshov, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Axel Lin, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Mike Kleshov, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?,
Axel Lin <=
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Mike Kleshov, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Axel Lin, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Mike Kleshov, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Mike Kleshov, 2017/12/07
- [lwip-devel] [bug #52611] Incorrect use of ctype macros?, Dirk Ziegelmeier, 2017/12/07