diff options
author | 2011-11-20 19:51:23 -0500 | |
---|---|---|
committer | 2011-11-20 19:51:55 -0500 | |
commit | 9eba397314f86e231fa091e5203a80eccfacd6b8 (patch) | |
tree | e27e608f90ca8cc9a7bf3f9009e5b0bdee32960a | |
parent | fix "format not a string literal" warnings (diff) | |
download | net-tools-9eba397314f86e231fa091e5203a80eccfacd6b8.tar.gz net-tools-9eba397314f86e231fa091e5203a80eccfacd6b8.tar.bz2 net-tools-9eba397314f86e231fa091e5203a80eccfacd6b8.zip |
fix integer/pointer cast warnings
On 64bit systems where sizeof(void *) != sizeof(int), we get a warning
when trying to assign the return of atoi(). So insert a cast to avoid.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | ifconfig.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -497,7 +497,7 @@ int main(int argc, char **argv) if (!strcmp(*spp, "keepalive")) { if (*++spp == NULL) usage(); - ifr.ifr_data = (caddr_t) atoi(*spp); + ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp); if (ioctl(skfd, SIOCSKEEPALIVE, &ifr) < 0) { fprintf(stderr, "SIOCSKEEPALIVE: %s\n", strerror(errno)); goterr = 1; @@ -511,7 +511,7 @@ int main(int argc, char **argv) if (!strcmp(*spp, "outfill")) { if (*++spp == NULL) usage(); - ifr.ifr_data = (caddr_t) atoi(*spp); + ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp); if (ioctl(skfd, SIOCSOUTFILL, &ifr) < 0) { fprintf(stderr, "SIOCSOUTFILL: %s\n", strerror(errno)); goterr = 1; |