patch #6699: fixed some warnings on platform where sizeof(int) == 2

This commit is contained in:
goldsimon
2008-12-19 18:08:29 +00:00
parent 411cb39eb4
commit aa568727d1
9 changed files with 62 additions and 20 deletions

View File

@@ -83,7 +83,8 @@ int
inet_aton(const char *cp, struct in_addr *addr)
{
u32_t val;
int base, n, c;
u8_t base;
char c;
u32_t parts[4];
u32_t *pp = parts;
@@ -139,8 +140,7 @@ inet_aton(const char *cp, struct in_addr *addr)
* Concoct the address according to
* the number of parts specified.
*/
n = pp - parts + 1;
switch (n) {
switch (pp - parts + 1) {
case 0:
return (0); /* initial nondigit */

View File

@@ -107,7 +107,7 @@ lwip_standard_chksum(void *dataptr, u16_t len)
}
/* add deferred carry bits */
acc = (acc >> 16) + (acc & 0x0000ffffUL);
if ((acc & 0xffff0000) != 0) {
if ((acc & 0xffff0000UL) != 0) {
acc = (acc >> 16) + (acc & 0x0000ffffUL);
}
/* This maybe a little confusing: reorder sum using htons()