[PATCH v7 01/14] time: Protect the print_timezone() function
Alistair Francis
alistair.francis at wdc.com
Fri Apr 17 16:47:11 UTC 2020
To avoid the following error:
time.c:17:1: error: 'print_timezone' defined but not used [-Werror=unused-function]
ensure that print_timezone is only defined if we are going to use it.
Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
---
time.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/time.c b/time.c
index 03863e26..cfc0324c 100644
--- a/time.c
+++ b/time.c
@@ -13,6 +13,7 @@
#include <signal.h>
#include <sys/timex.h>
+#if HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS || defined(ALPHA)
static void
print_timezone(struct tcb *const tcp, const kernel_ulong_t addr)
{
@@ -24,6 +25,7 @@ print_timezone(struct tcb *const tcp, const kernel_ulong_t addr)
tprintf("{tz_minuteswest=%d, tz_dsttime=%d}",
tz.tz_minuteswest, tz.tz_dsttime);
}
+#endif
#if HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS
SYS_FUNC(gettimeofday)
--
2.26.0
More information about the Strace-devel
mailing list