mesa: add fallthrough comments to COPY_SZ_4V()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 1 Jul 2020 05:10:34 +0000 (15:10 +1000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 2 Jul 2020 23:52:52 +0000 (23:52 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5705>

src/mesa/main/macros.h

index caa310fd021c85f458ce7990eedc884486276a82..bd07fa71bc662e2a1e52384df969053e80aa4c40 100644 (file)
@@ -304,14 +304,14 @@ COPY_4UBV(GLubyte dst[4], const GLubyte src[4])
 }
 
 /** Copy \p SZ elements into a 4-element vector */
-#define COPY_SZ_4V(DST, SZ, SRC)  \
-do {                              \
-   switch (SZ) {                  \
-   case 4: (DST)[3] = (SRC)[3];   \
-   case 3: (DST)[2] = (SRC)[2];   \
-   case 2: (DST)[1] = (SRC)[1];   \
-   case 1: (DST)[0] = (SRC)[0];   \
-   }                              \
+#define COPY_SZ_4V(DST, SZ, SRC)                  \
+do {                                              \
+   switch (SZ) {                                  \
+   case 4: (DST)[3] = (SRC)[3]; /* fallthrough */ \
+   case 3: (DST)[2] = (SRC)[2]; /* fallthrough */ \
+   case 2: (DST)[1] = (SRC)[1]; /* fallthrough */ \
+   case 1: (DST)[0] = (SRC)[0]; /* fallthrough */ \
+   }                                              \
 } while(0)
 
 /** Copy \p SZ elements into a homegeneous (4-element) vector, giving