From: Luca Boccassi Date: Sun, 9 Jul 2023 12:03:44 +0000 (+0100) Subject: sleep: fix unused variable warning X-Git-Tag: v254-rc2~52^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28308%2Fhead;p=thirdparty%2Fsystemd.git sleep: fix unused variable warning log_level_ignored is used only inside the ifdef, so declare it there too --- diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index dd860d28584..30e53f3a360 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -53,8 +53,7 @@ static SleepOperation arg_operation = _SLEEP_OPERATION_INVALID; static int write_efi_hibernate_location(const HibernateLocation *hibernate_location, bool required) { - int log_level = required ? LOG_ERR : LOG_DEBUG, - log_level_ignore = required ? LOG_WARNING : LOG_DEBUG; + int log_level = required ? LOG_ERR : LOG_DEBUG; #if ENABLE_EFI _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; @@ -64,7 +63,7 @@ static int write_efi_hibernate_location(const HibernateLocation *hibernate_locat const char *uuid_str; sd_id128_t uuid; struct utsname uts = {}; - int r; + int r, log_level_ignore = required ? LOG_WARNING : LOG_DEBUG; assert(hibernate_location); assert(hibernate_location->swap);