diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-07-01 08:34:00 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-07-01 08:34:00 -0400 |
commit | bd4c37d3464fefccfff3ce3c2236de09140e8d79 (patch) | |
tree | feb81a3116dad7ed26bdb171640d5dee943e88aa /gpsdctl.c | |
parent | 77961935ec26802fe7ef5db1b80157ce9c65426b (diff) | |
download | gpsd-bd4c37d3464fefccfff3ce3c2236de09140e8d79.tar.gz |
Compiler warning suppression.
Diffstat (limited to 'gpsdctl.c')
-rw-r--r-- | gpsdctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -14,6 +14,7 @@ #include <stdbool.h> #include <stdlib.h> #include <stdio.h> +#include <assert.h> #ifndef S_SPLINT_S #include <sys/socket.h> #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"); |