On Fri, Jun 23, 2017 at 06:12:49PM +0200, Timothy Redaelli wrote:
> -Wimplicit-fallthrough warns when a switch case falls through and since this
> warning is enabled by -Wextra it breaks building with --enable-Werror.
> 
> Added "/* fall through */" comment when needed in order to avoid the warning.
> 
> Signed-off-by: Timothy Redaelli <[email protected]>
> ---
> 
> From GCC 7 Release Note:                                                      
>   
> -Wimplicit-fallthrough warns when a switch case falls through.                
>   
> This warning has five different levels.                                       
>   
> The compiler is able to parse a wide range of fallthrough comments,           
>   
> depending on the level.                                                       
>   
> It also handles control-flow statements, such as ifs.                         
>   
> It's possible to suppress the warning by either adding a fallthrough comment, 
>   
> or by using a null statement: __attribute__ ((fallthrough));                  
>   
> (C, C++), or [[fallthrough]]; (C++17), or [[gnu::fallthrough]]; 
> (C++11/C++14).  
> This warning is enabled by -Wextra.

Thanks!

I guess that since -Wextra enables this, we don't need to add any new
options ourselves?

I applied this to master.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to