Skip to content

Commit

Permalink
silence deadstore warning
Browse files Browse the repository at this point in the history
this happens due to the ifdef below being true, but the
initialization is necessary when those ifdefs are false.
  • Loading branch information
N-R-K committed Oct 3, 2024
1 parent 1ca7bed commit b1c5c44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scrot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ": ";
Expand Down

0 comments on commit b1c5c44

Please sign in to comment.