SNTP: Avoid warning if debugging is disabled

This commit is contained in:
Daniel Elstner 2017-05-03 01:55:15 +02:00 committed by Dirk Ziegelmeier
parent ddf4e17411
commit ccf10a5023

View File

@ -262,7 +262,7 @@ static ip_addr_t sntp_last_server_address;
static struct sntp_time sntp_last_timestamp_sent; static struct sntp_time sntp_last_timestamp_sent;
#endif /* SNTP_CHECK_RESPONSE >= 2 */ #endif /* SNTP_CHECK_RESPONSE >= 2 */
#ifndef sntp_format_time #if defined(LWIP_DEBUG) && !defined(sntp_format_time)
/* Debug print helper. */ /* Debug print helper. */
static const char * static const char *
sntp_format_time(s32_t sec) sntp_format_time(s32_t sec)
@ -271,7 +271,7 @@ sntp_format_time(s32_t sec)
ut = (u32_t)((u32_t)sec + DIFF_SEC_1970_2036); ut = (u32_t)((u32_t)sec + DIFF_SEC_1970_2036);
return ctime(&ut); return ctime(&ut);
} }
#endif /* !sntp_format_time */ #endif /* LWIP_DEBUG && !sntp_format_time */
/** /**
* SNTP processing of received timestamp * SNTP processing of received timestamp