Commit 5f48ce0b6403282f1f7e8a5cef2721f95f01e0f7

Sam Lantinga 2017-09-10T12:49:41

Fixed bug 3815 - implicit-fallthrough warning - DUFFS_LOOP4 and friends

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h
index 6f238ab..736e783 100644
--- a/src/video/SDL_blit.h
+++ b/src/video/SDL_blit.h
@@ -488,10 +488,10 @@ do {                                                                    \
 #define DUFFS_LOOP4(pixel_copy_increment, width)                        \
 { int n = (width+3)/4;                                                  \
     switch (width & 3) {                                                \
-    case 0: do {    pixel_copy_increment;                               \
-    case 3:     pixel_copy_increment;                                   \
-    case 2:     pixel_copy_increment;                                   \
-    case 1:     pixel_copy_increment;                                   \
+    case 0: do {    pixel_copy_increment;   /* fallthrough */           \
+    case 3:     pixel_copy_increment;       /* fallthrough */           \
+    case 2:     pixel_copy_increment;       /* fallthrough */           \
+    case 1:     pixel_copy_increment;       /* fallthrough */           \
         } while (--n > 0);                                              \
     }                                                                   \
 }