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 /gpspipe.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 'gpspipe.c')
-rw-r--r-- | gpspipe.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -70,13 +70,13 @@ static void open_serial(char *device) * tty. */ if ((fd_out = open(device, O_RDWR | O_NOCTTY)) == -1) { - fprintf(stderr, "gpspipe: error opening serial port\n"); + (void)fprintf(stderr, "gpspipe: error opening serial port\n"); exit(EXIT_FAILURE); } /* Save current serial port settings for later */ if (tcgetattr(fd_out, &oldtio) != 0) { - fprintf(stderr, "gpspipe: error reading serial port settings\n"); + (void)fprintf(stderr, "gpspipe: error reading serial port settings\n"); exit(EXIT_FAILURE); } @@ -362,17 +362,17 @@ int main(int argc, char **argv) } } if (fputc(c, fp) == EOF) { - fprintf(stderr, "gpspipe: write error, %s(%d)\n", - strerror(errno), errno); + (void)fprintf(stderr, "gpspipe: write error, %s(%d)\n", + strerror(errno), errno); exit(EXIT_FAILURE); } if (c == '\n') { if (serialport != NULL) { if (write(fd_out, serbuf, (size_t) j) == -1) { - fprintf(stderr, - "gpspipe: serial port write error, %s(%d)\n", - strerror(errno), errno); + (void)fprintf(stderr, + "gpspipe: serial port write error, %s(%d)\n", + strerror(errno), errno); exit(EXIT_FAILURE); } j = 0; |