[PATCH libdrm] radeon: add fallthrough annotation

Eric Engestrom eric at engestrom.ch
Sun Jul 30 20:34:16 UTC 2017


GCC 7 started warning when a switch case has neither a `break` nor
a "fallthrough" comment.
Let's be explicit that we meant to fall through here.

Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
 radeon/radeon_surface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 965be24c..04df77d6 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -2503,6 +2503,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man,
         if (surf->npix_y > 1) {
             return -EINVAL;
         }
+        /* fallthrough */
     case RADEON_SURF_TYPE_2D:
         if (surf->npix_z > 1) {
             return -EINVAL;
-- 
Cheers,
  Eric



More information about the dri-devel mailing list