diff mbox

[ovs-dev,v2,3/3] build-windows: cccl fail compilation on Wimplicit-function-declaration

Message ID 20170519202357.3772-3-aserdean@cloudbasesolutions.com
State Deferred
Headers show

Commit Message

Alin Serdean May 19, 2017, 8:25 p.m. UTC
Gcc compiler argument -Wall contains -Wimplicit-function-declaration which
gives warnings when a function is used before declared.
Map VStudio compiler error C4013 to it.
More info on C4013:
https://msdn.microsoft.com/en-us/library/d3ct4kz9.aspx

At the moment we cannot switch to the equivalent -Werror because we need
to solve other warnings.

As a temporary solution issue an error when this warning is triggered.
This will help development on the Windows side.

Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
---
 build-aux/cccl | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Ben Pfaff May 19, 2017, 11:07 p.m. UTC | #1
On Fri, May 19, 2017 at 08:25:11PM +0000, Alin Serdean wrote:
> Gcc compiler argument -Wall contains -Wimplicit-function-declaration which
> gives warnings when a function is used before declared.
> Map VStudio compiler error C4013 to it.
> More info on C4013:
> https://msdn.microsoft.com/en-us/library/d3ct4kz9.aspx
> 
> At the moment we cannot switch to the equivalent -Werror because we need
> to solve other warnings.
> 
> As a temporary solution issue an error when this warning is triggered.
> This will help development on the Windows side.
> 
> Suggested-by: Ben Pfaff <blp@ovn.org>
> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
> ---
>  build-aux/cccl | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/build-aux/cccl b/build-aux/cccl
> index 93f9c50..e2426fb 100644
> --- a/build-aux/cccl
> +++ b/build-aux/cccl
> @@ -144,6 +144,14 @@ EOF
>          #ignore pedantic
>          ;;
>  
> +    -Wall)
> +        # not all warnings are implemented
> +        # the following is equivalent to
> +        # Wimplicit-function-declaration but we will issue a compiler
> +        # error
> +        clopt="$clopt ${slash}we4013"
> +        ;;

Looks good to me.  I don't know whether this causes errors if it is
applied before patches 1 and 2, so to be on the same side I'll defer
pushing it.
diff mbox

Patch

diff --git a/build-aux/cccl b/build-aux/cccl
index 93f9c50..e2426fb 100644
--- a/build-aux/cccl
+++ b/build-aux/cccl
@@ -144,6 +144,14 @@  EOF
         #ignore pedantic
         ;;
 
+    -Wall)
+        # not all warnings are implemented
+        # the following is equivalent to
+        # Wimplicit-function-declaration but we will issue a compiler
+        # error
+        clopt="$clopt ${slash}we4013"
+        ;;
+
     -W*)
         #ignore warnings
         ;;