From b0b24bda5ee6403a051012c4be76a79d2051eb79 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 17 Oct 2013 12:55:03 +0200 Subject: heimdal: Fix warning in krb5-child-test's printtime This is when krb5_timestamp_to_sfstring is not available and thus the helper variables are not used. In future heimdal's krb5_format_time could be used on the heimdal side. --- src/tests/krb5_child-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c index 89abfd4c..102827ed 100644 --- a/src/tests/krb5_child-test.c +++ b/src/tests/krb5_child-test.c @@ -290,17 +290,17 @@ child_done(struct tevent_req *req) static void printtime(krb5_timestamp ts) { +#ifdef HAVE_KRB5_TIMESTAMP_TO_SFSTRING krb5_error_code kret; char timestring[BUFSIZ]; char fill = '\0'; -#ifdef HAVE_KRB5_TIMESTAMP_TO_SFSTRING kret = krb5_timestamp_to_sfstring(ts, timestring, BUFSIZ, &fill); if (kret) { KRB5_CHILD_TEST_DEBUG(SSSDBG_OP_FAILURE, kret); } printf("%s", timestring); -#else +#elif defined(HAVE_KRB5_FORMAT_TIME) printf("%s", ctime(&ts)); #endif /* HAVE_KRB5_TIMESTAMP_TO_SFSTRING */ } -- cgit