From 634feae2c34c66d8b33af70bbdd0dcf99f9f944e Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 3 Jul 2019 11:17:17 +0100 Subject: [PATCH] Add braces to avoid dangling-else problem. When compiling under clang, it detects that this clause might suffer from the dangling else problem and issues a diagnostic. --- src/libImaging/Draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libImaging/Draw.c b/src/libImaging/Draw.c index 295d305b6..559be1b00 100644 --- a/src/libImaging/Draw.c +++ b/src/libImaging/Draw.c @@ -66,13 +66,14 @@ typedef void (*hline_handler)(Imaging, int, int, int, int); static inline void point8(Imaging im, int x, int y, int ink) { - if (x >= 0 && x < im->xsize && y >= 0 && y < im->ysize) + if (x >= 0 && x < im->xsize && y >= 0 && y < im->ysize) { if (strncmp(im->mode, "I;16", 4) == 0) { im->image8[y][x*2] = (UINT8) ink; im->image8[y][x*2+1] = (UINT8) ink; } else { im->image8[y][x] = (UINT8) ink; } + } } static inline void