On Tue, Jun 28, 2016 at 10:02:28PM -0700, William Tu wrote: > Clang reports variable 'error' never been used. Fix by > returning error when table_update->type != JSON_OBJECT. > > Signed-off-by: William Tu <u9012...@gmail.com>
Thanks, applied, except that I changed this to simplify the code slightly: --8<--------------------------cut here-------------------------->8-- From: William Tu <u9012...@gmail.com> Date: Tue, 28 Jun 2016 22:02:28 -0700 Subject: [PATCH] ovsdb: Fix dead assignment reported by clang. Clang reports variable 'error' never been used. Fix by returning error when table_update->type != JSON_OBJECT. Signed-off-by: William Tu <u9012...@gmail.com> Signed-off-by: Ben Pfaff <b...@ovn.org> --- ovsdb/replication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovsdb/replication.c b/ovsdb/replication.c index 3d1bc33..a267a3a 100644 --- a/ovsdb/replication.c +++ b/ovsdb/replication.c @@ -468,8 +468,8 @@ process_table_update(struct json *table_update, const char *table_name, struct ovsdb_error *error; if (table_update->type != JSON_OBJECT) { - error = ovsdb_error("Not a JSON object", - "<table-update> for table is not object"); + return ovsdb_error("Not a JSON object", + "<table-update> for table is not object"); } table = ovsdb_get_table(database, table_name); -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev