summaryrefslogtreecommitdiff
path: root/ntpshmmon.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 /ntpshmmon.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 'ntpshmmon.c')
-rw-r--r--ntpshmmon.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ntpshmmon.c b/ntpshmmon.c
index f8768a35..04cd8c6e 100644
--- a/ntpshmmon.c
+++ b/ntpshmmon.c
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
argv[0], VERSION, REVISION);
exit(EXIT_SUCCESS);
case 'h':
- fprintf(stderr,
+ (void)fprintf(stderr,
"usage: ntpshmmon [-s] [-n max] [-t timeout] [-v] [-h] [-V]\n"
" -h print this help\n"
" -n nsamples exit after nsamples\n"
@@ -77,7 +77,7 @@ int main(int argc, char **argv)
for (i = 0; i < NTPSEGMENTS; i++) {
segments[i] = shm_get(i, false, true);
if (verbose && segments[i] != NULL)
- fprintf(stderr, "unit %d opened\n", i);
+ (void)fprintf(stderr, "unit %d opened\n", i);
}
if (killall) {
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
long long diff; /* 32 bit long is too short for a timespec */
enum segstat_t status = ntp_read(segments[i], &shm_stat, false);
if (verbose)
- fprintf(stderr, "unit %d status %d\n", i, status);
+ (void)fprintf(stderr, "unit %d status %d\n", i, status);
switch(status) {
case OK:
/* ntpd can slew the clock at 120% real time
@@ -144,15 +144,15 @@ int main(int argc, char **argv)
/* do nothing, data not ready, wait another cycle */
break;
case BAD_MODE:
- fprintf(stderr, "ntpshmmon: unknown mode %d on segment %s\n",
- shm_stat.status, ntp_name(i));
+ (void)fprintf(stderr, "ntpshmmon: unknown mode %d on segment %s\n",
+ shm_stat.status, ntp_name(i));
break;
case CLASH:
/* do nothing, data is corrupt, wait another cycle */
break;
default:
- fprintf(stderr, "ntpshmmon: unknown status %d on segment %s\n",
- status, ntp_name(i));
+ (void)fprintf(stderr, "ntpshmmon: unknown status %d on segment %s\n",
+ status, ntp_name(i));
break;
}
}