diff mbox series

[v2,11/12] slof/prim: Compile with -Wextra

Message ID 20210209014457.108301-12-aik@ozlabs.ru
State Accepted
Headers show
Series Compile with -Wextra | expand

Commit Message

Alexey Kardashevskiy Feb. 9, 2021, 1:44 a.m. UTC
-Wextra enables a bunch of rather useful checks which this fixes.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 slof/prim.code | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thomas Huth Feb. 10, 2021, 8:38 a.m. UTC | #1
On 09/02/2021 02.44, Alexey Kardashevskiy wrote:
> -Wextra enables a bunch of rather useful checks which this fixes.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>   slof/prim.code | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/slof/prim.code b/slof/prim.code
> index bb9e036a9933..b9db1519cbcb 100644
> --- a/slof/prim.code
> +++ b/slof/prim.code
> @@ -469,18 +469,21 @@ code_FILL:
>   #endif
>   				while ((size-=sizeof(type_u)) >= 0)
>   					*up++ = fill_v;
> +				break;
>   			}
>   			case sizeof(type_l): {
>   				type_l *lp = (type_l *)d;
>   
>   				while ((size-=sizeof(type_l)) >= 0)
>   					*lp++ = (type_l)fill_v;
> +				break;
>   			}
>   			case sizeof(type_w): {
>   				type_w *wp = (type_w *)d;
>   
>   				while ((size-=sizeof(type_w)) >= 0)
>   					*wp++ = (type_w)fill_v;
> +				break;
>   			}
>   			default:
>   				while (size-- > 0)
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/slof/prim.code b/slof/prim.code
index bb9e036a9933..b9db1519cbcb 100644
--- a/slof/prim.code
+++ b/slof/prim.code
@@ -469,18 +469,21 @@  code_FILL:
 #endif
 				while ((size-=sizeof(type_u)) >= 0)
 					*up++ = fill_v;
+				break;
 			}
 			case sizeof(type_l): {
 				type_l *lp = (type_l *)d;
 
 				while ((size-=sizeof(type_l)) >= 0)
 					*lp++ = (type_l)fill_v;
+				break;
 			}
 			case sizeof(type_w): {
 				type_w *wp = (type_w *)d;
 
 				while ((size-=sizeof(type_w)) >= 0)
 					*wp++ = (type_w)fill_v;
+				break;
 			}
 			default:
 				while (size-- > 0)