From a7513c76e5481084e0092619883c8205d3df9eae Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 27 Apr 2010 18:11:38 +0200 Subject: [PATCH] better fix the gcc warning --- src/read_tcpip.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/read_tcpip.cc b/src/read_tcpip.cc index 5f588825..08c7b0b6 100644 --- a/src/read_tcpip.cc +++ b/src/read_tcpip.cc @@ -37,6 +37,7 @@ #include #include #include +#include struct read_tcpip_data { char *host; @@ -75,7 +76,7 @@ void parse_tcp_ping_arg(struct text_object *obj, const char *arg, void *free_at_ obj->data.opaque = addr; memset(addr, 0, sizeof(struct sockaddr_in)); hostname = (char *) malloc(strlen(arg)+1); - switch( sscanf(arg, "%s %u", hostname, (unsigned int*) &(addr->sin_port)) ) { + switch( sscanf(arg, "%s %"SCNu16, hostname, &(addr->sin_port)) ) { case 1: addr->sin_port = DEFAULT_TCP_PING_PORT; break;