mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP: fix build warning on wrong cast from void* to unsigned long
ppp/utils.c: In function 'ppp_vslprintf': ppp/utils.c:251:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] val = (unsigned long) va_arg(args, void *); ^ This is because a void* type is casted into an unsigned long type, which obviously isn't correct on LLP64 systems such as Windows. Actually, we are not using %p, thus we remove %p support completely instead of trying to fix the issue in unused code.
This commit is contained in:
parent
ac4d994249
commit
a83c4e0897
@ -247,11 +247,13 @@ int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) {
|
||||
val = va_arg(args, unsigned int);
|
||||
base = 16;
|
||||
break;
|
||||
#if 0 /* unused (and wrong on LLP64 systems) */
|
||||
case 'p':
|
||||
val = (unsigned long) va_arg(args, void *);
|
||||
base = 16;
|
||||
neg = 2;
|
||||
break;
|
||||
#endif /* unused (and wrong on LLP64 systems) */
|
||||
case 's':
|
||||
str = va_arg(args, char *);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user