diff mbox

[ovs-dev] lib: fix sparse warnings

Message ID 1450134495-27560-1-git-send-email-azhou@ovn.org
State Accepted
Headers show

Commit Message

Andy Zhou Dec. 14, 2015, 11:08 p.m. UTC
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 Perches <joe@perches.com>
See: https://travis-ci.org/openvswitch/ovs/jobs/96737772#L870
Signed-off-by: Andy Zhou <azhou@ovn.org>
---
 lib/ovsdb-idl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ben Pfaff Dec. 15, 2015, 8:28 a.m. UTC | #1
On Mon, Dec 14, 2015 at 03:08:15PM -0800, Andy Zhou wrote:
> 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 Perches <joe@perches.com>
> See: https://travis-ci.org/openvswitch/ovs/jobs/96737772#L870
> Signed-off-by: Andy Zhou <azhou@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Joe Stringer Dec. 15, 2015, 6:55 p.m. UTC | #2
On 14 December 2015 at 15:08, Andy Zhou <azhou@ovn.org> wrote:
> 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 Perches <joe@perches.com>
> See: https://travis-ci.org/openvswitch/ovs/jobs/96737772#L870
> Signed-off-by: Andy Zhou <azhou@ovn.org>

Did Joe Perches also report the error? Nice to know I'm not the only
one checking Travis :-)

Just a note with the travis builds, you've already pointed out the
failure in the commit message, so linking the failure doesn't provide
much additional information. IMO It would provide more information if
it is a build with this patch, so you can show that it fixes the
build.

Acked-by: Joe Stringer <joe@ovn.org>
Andy Zhou Dec. 15, 2015, 7:22 p.m. UTC | #3
On Tue, Dec 15, 2015 at 12:28 AM, Ben Pfaff <blp@ovn.org> wrote:

> On Mon, Dec 14, 2015 at 03:08:15PM -0800, Andy Zhou wrote:
> > 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 Perches <joe@perches.com>
> > See: https://travis-ci.org/openvswitch/ovs/jobs/96737772#L870
> > Signed-off-by: Andy Zhou <azhou@ovn.org>
>
> Acked-by: Ben Pfaff <blp@ovn.org>
>

Thanks.
Andy Zhou Dec. 15, 2015, 7:28 p.m. UTC | #4
On Tue, Dec 15, 2015 at 10:55 AM, Joe Stringer <joe@ovn.org> wrote:

> On 14 December 2015 at 15:08, Andy Zhou <azhou@ovn.org> wrote:
> > 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 Perches <joe@perches.com>
> > See: https://travis-ci.org/openvswitch/ovs/jobs/96737772#L870
> > Signed-off-by: Andy Zhou <azhou@ovn.org>
>
> Did Joe Perches also report the error? Nice to know I'm not the only
> one checking Travis :-)
>
Sorry, cut-and-paste error.

>
> Just a note with the travis builds, you've already pointed out the
> failure in the commit message, so linking the failure doesn't provide
> much additional information. IMO It would provide more information if
> it is a build with this patch, so you can show that it fixes the
> build.
>
> O.K. I will drop the link.

> Acked-by: Joe Stringer <joe@ovn.org>
>
Thanks.
diff mbox

Patch

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 0d02ae8..6086935 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -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);