[ovs-dev] [PATCH 1/4] Fix "Not all control paths return a value" warning by MSVC.
Gurucharan Shetty
shettyg at nicira.com
Mon Sep 15 17:36:11 UTC 2014
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
tests/test-reconnect.c | 1 +
utilities/ovs-ofctl.c | 3 +++
vswitchd/ovs-vswitchd.c | 1 +
3 files changed, 5 insertions(+)
diff --git a/tests/test-reconnect.c b/tests/test-reconnect.c
index 35d5f41..c14dc26 100644
--- a/tests/test-reconnect.c
+++ b/tests/test-reconnect.c
@@ -118,6 +118,7 @@ error_from_string(const char *s)
return EOF;
} else {
ovs_fatal(0, "unknown error '%s'", s);
+ OVS_NOT_REACHED();
}
}
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 30cdf99..fa8bf72 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -930,10 +930,12 @@ set_protocol_for_flow_dump(struct vconn *vconn,
if (usable_protocols & allowed_protocols) {
ovs_fatal(0, "switch does not support any of the usable flow "
"formats (%s)", usable_s);
+ OVS_NOT_REACHED();
} else {
char *allowed_s = ofputil_protocols_to_string(allowed_protocols);
ovs_fatal(0, "none of the usable flow formats (%s) is among the "
"allowed flow formats (%s)", usable_s, allowed_s);
+ OVS_NOT_REACHED();
}
}
@@ -1161,6 +1163,7 @@ open_vconn_for_flow_mod(const char *remote, struct vconn **vconnp,
usable_s = ofputil_protocols_to_string(usable_protocols);
ovs_fatal(0, "switch does not support any of the usable flow "
"formats (%s)", usable_s);
+ OVS_NOT_REACHED();
}
static void
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index 4d7e4f0..dba89dc 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -236,6 +236,7 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
default:
VLOG_FATAL("at most one non-option argument accepted; "
"use --help for usage");
+ OVS_NOT_REACHED();
}
}
--
1.7.9.5
More information about the dev
mailing list