From bd4c37d3464fefccfff3ce3c2236de09140e8d79 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 1 Jul 2011 08:34:00 -0400 Subject: Compiler warning suppression. --- gpsdctl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gpsdctl.c') diff --git a/gpsdctl.c b/gpsdctl.c index a69aafae..b82cad58 100644 --- a/gpsdctl.c +++ b/gpsdctl.c @@ -14,6 +14,7 @@ #include #include #include +#include #ifndef S_SPLINT_S #include #endif /* S_SPLINT_S */ @@ -71,12 +72,12 @@ static int gpsd_control(char *action, char *argument) if (stat(argument, &sb) != 1) (void)chmod(argument, sb.st_mode | S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); (void)snprintf(buf, sizeof(buf), "+%s\r\n", argument); - (void)write(connect, buf, strlen(buf)); - (void)read(connect, buf, 12); + ignore_return(write(connect, buf, strlen(buf))); + ignore_return(read(connect, buf, 12)); } else if (strcmp(action, "remove") == 0) { (void)snprintf(buf, sizeof(buf), "-%s\r\n", argument); - (void)write(connect, buf, strlen(buf)); - (void)read(connect, buf, 12); + ignore_return(write(connect, buf, strlen(buf))); + ignore_return(read(connect, buf, 12)); } (void)close(connect); //syslog(LOG_DEBUG, "gpsd_control ends"); -- cgit v1.2.1