[ovs-dev] [PATCH 1/3] ovs-ofctl: Workaround a compiler warning on MSVC.

Alin Serdean aserdean at cloudbasesolutions.com
Wed Sep 10 21:05:08 UTC 2014


Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>

-----Mesaj original-----
De la: dev [mailto:dev-bounces at openvswitch.org] În numele Gurucharan Shetty
Trimis: Wednesday, September 10, 2014 10:56 PM
Către: dev at openvswitch.org
Cc: Gurucharan Shetty
Subiect: [ovs-dev] [PATCH 1/3] ovs-ofctl: Workaround a compiler warning on MSVC.

MSVC complains about a void function returning a value if there is a statement of the form - 'return foo()' even if foo() has a void return type.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 utilities/ovs-ofctl.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index cd8f840..30cdf99 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -1018,7 +1018,8 @@ static void
 ofctl_dump_flows(int argc, char *argv[])  {
     if (!n_criteria) {
-        return ofctl_dump_flows__(argc, argv, false);
+        ofctl_dump_flows__(argc, argv, false);
+        return;
     } else {
         struct ofputil_flow_stats *fses;
         size_t n_fses, allocated_fses;
@@ -1077,7 +1078,7 @@ ofctl_dump_flows(int argc, char *argv[])  static void  ofctl_dump_aggregate(int argc, char *argv[])  {
-    return ofctl_dump_flows__(argc, argv, true);
+    ofctl_dump_flows__(argc, argv, true);
 }
 
 static void
@@ -2894,7 +2895,7 @@ ofctl_parse_nxm__(bool oxm, enum ofp_version version)  static void  ofctl_parse_nxm(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)  {
-    return ofctl_parse_nxm__(false, 0);
+    ofctl_parse_nxm__(false, 0);
 }
 
 /* "parse-oxm VERSION": reads a series of OXM nx_match specifications as @@ -2909,7 +2910,7 @@ ofctl_parse_oxm(int argc OVS_UNUSED, char *argv[])
         ovs_fatal(0, "%s: not a valid version for OXM", argv[1]);
     }
 
-    return ofctl_parse_nxm__(true, version);
+    ofctl_parse_nxm__(true, version);
 }
 
 static void
--
1.7.9.5

_______________________________________________
dev mailing list
dev at openvswitch.org
http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list