From: Ben Pfaff Date: Wed, 10 Feb 2010 18:51:11 +0000 (-0800) Subject: ovsdb: Add default case to ovsdb_mutation_set_execute(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b71367c38c9d2e57261fe7f30cbfc1d20b39401;p=openvswitch ovsdb: Add default case to ovsdb_mutation_set_execute(). The value of 'error' is indeterminate if m->mutator is not set to a valid value here, so we should add a default case to handle the exception. It shouldn't happen, of course. Found by Clang (http://clang-analyzer.llvm.org/). --- diff --git a/ovsdb/mutation.c b/ovsdb/mutation.c index bd6986da..72d7d0ca 100644 --- a/ovsdb/mutation.c +++ b/ovsdb/mutation.c @@ -379,6 +379,9 @@ ovsdb_mutation_set_execute(struct ovsdb_row *row, ovsdb_datum_subtract(dst, dst_type, arg, arg_type); error = ovsdb_mutation_check_count(dst, dst_type); break; + + default: + NOT_REACHED(); } if (error) { return error;