From 3e3c50c3fd1682db7ad8269d588637e2251948a3 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 5 Feb 2019 08:21:03 -0600 Subject: Fix some llvm warnings. I don't know why NDK llvm is complaining about adjtime(), toys.h is #including which http://man7.org/linux/man-pages/man3/adjtime.3.html says is the right header...? --- toys/pending/sntp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toys/pending/sntp.c b/toys/pending/sntp.c index 97f878fa..f1415332 100644 --- a/toys/pending/sntp.c +++ b/toys/pending/sntp.c @@ -257,8 +257,8 @@ void sntp_main(void) // Display the time and offset if (!FLAG(q)) { format_iso_time(toybuf, sizeof(toybuf)-1, &tv2); - printf("%s offset %c%d.%09d secs\n", toybuf, (diff<0) ? '-' : '+', - abs(diff/1000000000), abs(diff%1000000000)); + printf("%s offset %c%lld.%09lld secs\n", toybuf, (diff<0) ? '-' : '+', + llabs(diff/1000000000), llabs(diff%1000000000)); } // If we're not in daemon mode, we're done. (Can't get here for -S.) -- cgit v1.2.3