From: Tobias Brunner Date: Mon, 1 May 2023 10:17:25 +0000 (+0200) Subject: systime-fix: Fix build with DEBUG_LEVEL < 1 X-Git-Tag: 5.9.11rc1~12^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74b2628301777ea50c6c3609bcdc997c3bb1cae3;p=thirdparty%2Fstrongswan.git systime-fix: Fix build with DEBUG_LEVEL < 1 --- diff --git a/src/libcharon/plugins/systime_fix/systime_fix_plugin.c b/src/libcharon/plugins/systime_fix/systime_fix_plugin.c index 99af799a85..bbebf82da3 100644 --- a/src/libcharon/plugins/systime_fix/systime_fix_plugin.c +++ b/src/libcharon/plugins/systime_fix/systime_fix_plugin.c @@ -145,7 +145,7 @@ static job_requeue_t check_systime(private_systime_fix_plugin_t *this) { enumerator_t *enumerator; ike_sa_t *ike_sa; - char *action; + char *action DBG_UNUSED; job_t *job; if (time(NULL) < this->threshold) @@ -204,7 +204,7 @@ static bool load_validator(private_systime_fix_plugin_t *this) struct tm tm = { .tm_mday = 1, }; - char *str, *fmt, buf[32]; + char *str, *fmt; fmt = lib->settings->get_str(lib->settings, "%s.plugins.%s.threshold_format", "%Y", lib->ns, get_name(this)); @@ -234,8 +234,11 @@ static bool load_validator(private_systime_fix_plugin_t *this) return FALSE; } +#if DEBUG_LEVEL >= 1 + char buf[32]; DBG1(DBG_CFG, "enabling %s, threshold: %s", get_name(this), asctime_r(&tm, buf)); +#endif this->validator = systime_fix_validator_create(this->threshold); return TRUE; }