From b1c5c444b8e01dbb71d20e97f68c6e4ee0ebc206 Mon Sep 17 00:00:00 2001 From: NRK Date: Thu, 3 Oct 2024 00:21:02 +0000 Subject: [PATCH] silence deadstore warning this happens due to the ifdef below being true, but the initialization is necessary when those ifdefs are false. --- src/scrot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scrot.c b/src/scrot.c index 616004b..97eabe5 100644 --- a/src/scrot.c +++ b/src/scrot.c @@ -271,7 +271,8 @@ static void scrotSaveImage(const char *filename) Imlib_Load_Error imErr; imlib_save_image_with_error_return(filename, &imErr); if (imErr) { - const char *colon = "", *errmsg = "", imlibPrefix[] = "Imlib2: "; + const char *colon = "", *errmsg = ""; // NOLINT(*DeadStores) + const char imlibPrefix[] = "Imlib2: "; #if defined(IMLIB2_VERSION) #if IMLIB2_VERSION >= IMLIB2_VERSION_(1, 10, 0) colon = ": ";