ovsdb_function_from_string() and ovsdb_function_to_string() are defined both in ovsdb/condition.c and lib/ovsdb-condidtion.c with the same function definition. Remove the one in ovsdb/condition.c to avoid duplication.
This also resolves the following bazel building error. ./libopenvswitch.lo(ovsdb-condition.pic.o): In function `ovsdb_function_from_string': /lib/ovsdb-condition.c:24: multiple definition of `ovsdb_function_from_string' ./libovsdb.a(condition.pic.o):/proc/self/cwd/external/openvswitch_repo/ovsdb/condition.c:34: first defined here ./libopenvswitch.lo(ovsdb-condition.pic.o): In function `ovsdb_function_from_string': ./lib/ovsdb-condition.c:24: multiple definition of `ovsdb_function_to_string' ./libovsdb.a(condition.pic.o):/proc/self/cwd/external/openvswitch_repo/ovsdb/condition.c:335 Reported-by: Harold Lim <[email protected]> Signed-off-by: Yi-Hung Wei <[email protected]> --- Travis-CI: https://travis-ci.org/github/YiHungWei/ovs/builds/677890120 --- ovsdb/condition.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/ovsdb/condition.c b/ovsdb/condition.c index 692c0932864c..388dd54a16cf 100644 --- a/ovsdb/condition.c +++ b/ovsdb/condition.c @@ -29,33 +29,6 @@ #include "table.h" #include "util.h" -struct ovsdb_error * -ovsdb_function_from_string(const char *name, enum ovsdb_function *function) -{ -#define OVSDB_FUNCTION(ENUM, NAME) \ - if (!strcmp(name, NAME)) { \ - *function = ENUM; \ - return NULL; \ - } - OVSDB_FUNCTIONS; -#undef OVSDB_FUNCTION - - return ovsdb_syntax_error(NULL, "unknown function", - "No function named %s.", name); -} - -const char * -ovsdb_function_to_string(enum ovsdb_function function) -{ - switch (function) { -#define OVSDB_FUNCTION(ENUM, NAME) case ENUM: return NAME; - OVSDB_FUNCTIONS; -#undef OVSDB_FUNCTION - } - - return NULL; -} - static struct ovsdb_error * ovsdb_clause_from_json(const struct ovsdb_table_schema *ts, const struct json *json, -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
