ovsdb: Add default case to ovsdb_mutation_set_execute().
authorBen Pfaff <blp@nicira.com>
Wed, 10 Feb 2010 18:51:11 +0000 (10:51 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 11 Feb 2010 18:35:28 +0000 (10:35 -0800)
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/).

ovsdb/mutation.c

index bd6986d..72d7d0c 100644 (file)
@@ -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;