summaryrefslogtreecommitdiff
path: root/gps2udp.c
diff options
context:
space:
mode:
authorRobert Norris <rw_norris@hotmail.com>2017-02-20 01:44:44 +0000
committerFred Wright <fw@fwright.net>2017-02-20 15:35:49 -0800
commite2695bd13a933a87779ae0c71447ee81486daefa (patch)
treecc7b0f369167c3b591737af32af3ee33168796bb /gps2udp.c
parent9d126a4eda9c3efdd593e63adfd5d2f7dddae18c (diff)
downloadgpsd-e2695bd13a933a87779ae0c71447ee81486daefa.tar.gz
Explicit marking of ignoring fprintf() result
Ensure consistent marking of '(void)' for most normal usage of fprintf() TESTED: 'scons build-all check' passes Signed-off-by: Fred Wright <fw@fwright.net>
Diffstat (limited to 'gps2udp.c')
-rw-r--r--gps2udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gps2udp.c b/gps2udp.c
index c02d8929..eb01eb90 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -89,7 +89,7 @@ static int send_udp (char *nmeastring, size_t ind)
/* compute message size and add 0x0a 0x0d */
for (ind=0; nmeastring [ind] != '\0'; ind ++) {
if (ind >= sizeof(message) - 3) {
- fprintf(stderr, "gps2udp: too big [%s] \n", nmeastring);
+ (void)fprintf(stderr, "gps2udp: too big [%s] \n", nmeastring);
return -1;
}
message[ind] = nmeastring[ind];
@@ -157,14 +157,14 @@ static int open_udp(char **hostport)
sock[channel]= socket(AF_INET, SOCK_DGRAM, 0);
if (sock[channel] < 0) {
- fprintf(stderr, "gps2udp: error creating UDP socket\n");
+ (void)fprintf(stderr, "gps2udp: error creating UDP socket\n");
return (-1);
}
remote[channel].sin_family = (sa_family_t)AF_INET;
hp = gethostbyname(hostname);
if (hp==NULL) {
- fprintf(stderr, "gps2udp: syntax is [-u hostname:port] [%s] is not a valid hostname\n",hostname);
+ (void)fprintf(stderr, "gps2udp: syntax is [-u hostname:port] [%s] is not a valid hostname\n",hostname);
return (-1);
}
@@ -476,7 +476,7 @@ int main(int argc, char **argv)
(void)fprintf(stdout," MMSI=%9u", mmsi);
}
- fprintf(stdout,"\n");
+ (void)fprintf(stdout,"\n");
}
// send to all UDP destinations
@@ -496,7 +496,7 @@ int main(int argc, char **argv)
} // end for (;;)
// This is an infinite loop, should never be here
- fprintf (stderr, "gpsd2udp ERROR abnormal exit\n");
+ (void)fprintf (stderr, "gpsd2udp ERROR abnormal exit\n");
exit (-1);
}