summaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorGurucharan Shetty <gshetty@nicira.com>2014-09-15 12:58:09 -0700
committerGurucharan Shetty <gshetty@nicira.com>2014-09-15 15:15:35 -0700
commit270f328621bfd8f80659150d5d3eec51754b5bfb (patch)
treec068c18ce82dcee21750e55f61ee2b3e4e157064 /ovsdb
parentd72eff6cec01187d9b6b0f8befdbdec0943e6012 (diff)
downloadopenvswitch-270f328621bfd8f80659150d5d3eec51754b5bfb.tar.gz
compiler: Define NO_RETURN for MSVC.
To prevent warnings such as "Not all control paths return a value", we should define NO_RETURN for MSVC. Currently for gcc, we add NO_RETURN at the end of function declaration. But for MSVC, "__declspec(noreturn)" is needed at the beginning of function declaration. So this commit moves NO_RETURN to the beginning of the function declaration as it works with gcc and clang too. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/ovsdb-client.c2
-rw-r--r--ovsdb/ovsdb-server.c2
-rw-r--r--ovsdb/ovsdb-tool.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c
index 29429531b..2f1a8372a 100644
--- a/ovsdb/ovsdb-client.c
+++ b/ovsdb/ovsdb-client.c
@@ -74,7 +74,7 @@ static struct table_style table_style = TABLE_STYLE_DEFAULT;
static const struct ovsdb_client_command *get_all_commands(void);
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static struct jsonrpc *open_jsonrpc(const char *server);
static void fetch_dbs(struct jsonrpc *, struct svec *dbs);
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index 7dc2adbc2..6219110b8 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -97,7 +97,7 @@ static void close_db(struct db *db);
static void parse_options(int *argc, char **argvp[],
struct sset *remotes, char **unixctl_pathp,
char **run_command);
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static char *reconfigure_remotes(struct ovsdb_jsonrpc_server *,
const struct shash *all_dbs,
diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
index e2a30ea72..350e72af6 100644
--- a/ovsdb/ovsdb-tool.c
+++ b/ovsdb/ovsdb-tool.c
@@ -46,7 +46,7 @@ static int show_log_verbosity;
static const struct command *get_all_commands(void);
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static const char *default_db(void);