lib: fix sparse warnings
authorAndy Zhou <azhou@ovn.org>
Mon, 14 Dec 2015 23:03:23 +0000 (15:03 -0800)
committerAndy Zhou <azhou@ovn.org>
Tue, 15 Dec 2015 19:29:19 +0000 (11:29 -0800)
Fixes the following sparse warning messages:

    lib/ovsdb-idl.c:146:12: error: symbol 'table_updates_names' was not
    declared. Should it be static?
    lib/ovsdb-idl.c:147:12: error: symbol 'table_update_names' was not
    declared. Should it be static?
    lib/ovsdb-idl.c:148:12: error: symbol 'row_update_names' was not
    declared. Should it be static?

Reported-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
lib/ovsdb-idl.c

index 0d02ae8..6086935 100644 (file)
@@ -143,9 +143,9 @@ enum ovsdb_update_version {
 };
 
 /* Name arrays indexed by 'enum ovsdb_update_version'. */
-const char *table_updates_names[] = {"table_updates", "table_updates2"};
-const char *table_update_names[] = {"table_update", "table_update2"};
-const char *row_update_names[] = {"row_update", "row_update2"};
+static const char *table_updates_names[] = {"table_updates", "table_updates2"};
+static const char *table_update_names[] = {"table_update", "table_update2"};
+static const char *row_update_names[] = {"row_update", "row_update2"};
 
 static struct vlog_rate_limit syntax_rl = VLOG_RATE_LIMIT_INIT(1, 5);
 static struct vlog_rate_limit semantic_rl = VLOG_RATE_LIMIT_INIT(1, 5);