diff options
author | Robert Norris <rw_norris@hotmail.com> | 2017-02-20 01:44:44 +0000 |
---|---|---|
committer | Fred Wright <fw@fwright.net> | 2017-02-20 15:35:49 -0800 |
commit | e2695bd13a933a87779ae0c71447ee81486daefa (patch) | |
tree | cc7b0f369167c3b591737af32af3ee33168796bb /gps2udp.c | |
parent | 9d126a4eda9c3efdd593e63adfd5d2f7dddae18c (diff) | |
download | gpsd-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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); } |