From 70843363d93a25adb99d60d2fe642252ef766b3b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 31 Oct 2012 22:01:47 +1030 Subject: [PATCH] time: remove unused var warning in example. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Compiler: /home/rusty/devel/cvs/ccan/ccan/time/time.h: In function ‘main’: /home/rusty/devel/cvs/ccan/ccan/time/time.h:334:16: warning: variable ‘tv’ set but not used [-Wunused-but-set-variable] Compiler: /home/rusty/devel/cvs/ccan/ccan/time/time.h: In function ‘main’: /home/rusty/devel/cvs/ccan/ccan/time/time.h:353:17: warning: variable ‘ts’ set but not used [-Wunused-but-set-variable] Signed-off-by: Rusty Russell --- ccan/time/time.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ccan/time/time.h b/ccan/time/time.h index a9936b50..5bb1ad5b 100644 --- a/ccan/time/time.h +++ b/ccan/time/time.h @@ -334,6 +334,7 @@ static inline struct timespec time_from_nsec(uint64_t nsec) * struct timeval tv; * * tv = timespec_to_timeval(time_now()); + * printf("time = %lu.%06u\n", (long)tv.tv_sec, (int)tv.tv_usec); */ static inline struct timeval timespec_to_timeval(struct timespec ts) { @@ -352,6 +353,7 @@ static inline struct timeval timespec_to_timeval(struct timespec ts) * struct timespec ts; * * ts = timeval_to_timespec(tv); + * printf("timespec = %lu.%09lu\n", (long)ts.tv_sec, (long)ts.tv_nsec); */ static inline struct timespec timeval_to_timespec(struct timeval tv) { -- 2.39.2