[Piglit] [PATCH 1/9] cmake: Fix -Wdeclaration-after-statement detection.

Brian Paul brianp at vmware.com
Tue Apr 29 17:56:16 PDT 2014


On 04/29/2014 11:57 AM, jfonseca at vmware.com wrote:
> From: José Fonseca <jfonseca at vmware.com>
>
> Copy'n'paste typo.  Trivial.
> ---
>   CMakeLists.txt | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index cbdccf1..3b051f7 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -220,7 +220,7 @@ if (NOT MSVC)
>   	# Unfortunately MSVC does not support C99.  Among all features enabled
>   	# by C99, declarations after statements is the most frequently used.
>   	# For portability sake, we request gcc to warn when this is used.
> -	CHECK_C_COMPILER_FLAG("-Wall" C_COMPILER_FLAG_WDECL_AFTER_STMT)
> +	CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" C_COMPILER_FLAG_WDECL_AFTER_STMT)
>   	IF (C_COMPILER_FLAG_WDECL_AFTER_STMT)
>   		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdeclaration-after-statement")
>   	ENDIF (C_COMPILER_FLAG_WDECL_AFTER_STMT)
>

The series LGTM.

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list