summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.c
diff options
context:
space:
mode:
authorRuediger Meier2017-06-28 18:37:44 +0200
committerRuediger Meier2017-06-29 14:04:36 +0200
commit3eeaef995bced0b44c23ae1dcd6c808667667986 (patch)
tree07ca5d799f4bf833563e9f5d387bc5d52cf501d3 /sys-utils/hwclock.c
parentsetpriv: align --help (diff)
downloadkernel-qcow2-util-linux-3eeaef995bced0b44c23ae1dcd6c808667667986.tar.gz
kernel-qcow2-util-linux-3eeaef995bced0b44c23ae1dcd6c808667667986.tar.xz
kernel-qcow2-util-linux-3eeaef995bced0b44c23ae1dcd6c808667667986.zip
hwclock: don't ifdef printf arguments
This may fails if printf() is macro, introduced in cc7cb070. clang compiler warnings: CC sys-utils/hwclock.o ../sys-utils/hwclock.c:1228:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] #ifdef __linux__ ^ ../sys-utils/hwclock.c:1230:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] #endif ^ 2 warnings generated. CC: J William Piggott <elseifthen@gmx.com> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r--sys-utils/hwclock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 2f2c03a6f..a0a48dd13 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -1225,10 +1225,11 @@ usage(const struct hwclock_control *ctl)
fputs(USAGE_OPTIONS, out);
fputs(_(" -u, --utc inform hwclock the RTC timescale is UTC\n"), out);
fputs(_(" -l, --localtime inform hwclock the RTC timescale is Local\n"), out);
- fprintf(out, _(
#ifdef __linux__
- " -f, --rtc <file> use an alternate file to %1$s\n"
+ printf(_(
+ " -f, --rtc <file> use an alternate file to %1$s\n"), _PATH_RTC_DEV);
#endif
+ printf(_(
" --directisa use the ISA bus instead of %1$s access\n"), _PATH_RTC_DEV);
fputs(_(" --date <time> date/time input for --set and --predict\n"), out);
#if defined(__linux__) && defined(__alpha__)