radeon: add fallthrough annotation
PATCH 1/1 radeon: add fallthrough annotation
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.
--- radeon/radeon_surface.c | 1 + 1 file changed, 1 insertion(+)
radeon/radeon_surface.c +1 -0
@@ -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 ;
Signature · 7 lines
Cheers, Eric _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 15 lines · Eric Engestrom
GCC 7 started warning when a switch case has neither a
breaknor a "fallthrough" comment.
Let's be explicit that we meant to fall through here.Signed-off-by Eric Engestrom <[email protected]>--- radeon/radeon_surface.c | 1 + 1 file changed, 1 insertion(+)radeon/radeon_surface.c +0
-0
radeon/radeon_surface.c static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, · line 2509
Quoted 7 lines
radeon/radeon_surface.c +1
-0@@ -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 ;
P.S. Patches touching the radeon (and amdgpu) directory should (also) be sent to the amd-gfx mailing list for review.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Michel Dänzer
Quoted 9 lines · Eric Engestrom
GCC 7 started warning when a switch case has neither a
breaknor a "fallthrough" comment.
Let's be explicit that we meant to fall through here.Signed-off-by Eric Engestrom <[email protected]>--- radeon/radeon_surface.c | 1 + 1 file changed, 1 insertion(+)
Quoted 15 lines
radeon/radeon_surface.c static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, · line 2509
Quoted 13 lines
radeon/radeon_surface.c +1
-0@@ -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 ;Reviewed-by Michel Dänzer <[email protected]>
Thanks!
Quoted 3 lines
P.S. Patches touching the radeon (and amdgpu) directory should (also) be sent to the amd-gfx mailing list for review.
Sure, making a note.
Do we want a scripts/get_(maintainer|reviewer).pl for libdrm?
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel