summaryrefslogtreecommitdiff
path: root/gpsdctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-07-01 08:34:00 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-07-01 08:34:00 -0400
commitbd4c37d3464fefccfff3ce3c2236de09140e8d79 (patch)
treefeb81a3116dad7ed26bdb171640d5dee943e88aa /gpsdctl.c
parent77961935ec26802fe7ef5db1b80157ce9c65426b (diff)
downloadgpsd-bd4c37d3464fefccfff3ce3c2236de09140e8d79.tar.gz
Compiler warning suppression.
Diffstat (limited to 'gpsdctl.c')
-rw-r--r--gpsdctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gpsdctl.c b/gpsdctl.c
index a69aafae..b82cad58 100644
--- a/gpsdctl.c
+++ b/gpsdctl.c
@@ -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");