[ovs-dev] [sparse 04/18] Add missing "static" keywords.

Ethan Jackson ethan at nicira.com
Fri May 13 00:41:43 UTC 2011


Looks Good.

Ethan

On Fri, May 6, 2011 at 13:16, Ben Pfaff <blp at nicira.com> wrote:
> Found by sparse.
> ---
>  lib/dpif-linux.c       |   10 +++++-----
>  ovsdb/execution.c      |   12 ++++++------
>  ovsdb/jsonrpc-server.c |    4 ++--
>  utilities/ovs-dpctl.c  |    2 +-
>  4 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
> index 0aad867..24a81bd 100644
> --- a/lib/dpif-linux.c
> +++ b/lib/dpif-linux.c
> @@ -1473,7 +1473,7 @@ dpif_linux_dp_to_ofpbuf(const struct dpif_linux_dp *dp, struct ofpbuf *buf)
>  }
>
>  /* Clears 'dp' to "empty" values. */
> -void
> +static void
>  dpif_linux_dp_init(struct dpif_linux_dp *dp)
>  {
>     memset(dp, 0, sizeof *dp);
> @@ -1500,7 +1500,7 @@ dpif_linux_dp_dump_start(struct nl_dump *dump)
>  * result of the command is expected to be of the same form, which is decoded
>  * and stored in '*reply' and '*bufp'.  The caller must free '*bufp' when the
>  * reply is no longer needed ('reply' will contain pointers into '*bufp'). */
> -int
> +static int
>  dpif_linux_dp_transact(const struct dpif_linux_dp *request,
>                        struct dpif_linux_dp *reply, struct ofpbuf **bufp)
>  {
> @@ -1530,7 +1530,7 @@ dpif_linux_dp_transact(const struct dpif_linux_dp *request,
>  /* Obtains information about 'dpif_' and stores it into '*reply' and '*bufp'.
>  * The caller must free '*bufp' when the reply is no longer needed ('reply'
>  * will contain pointers into '*bufp').  */
> -int
> +static int
>  dpif_linux_dp_get(const struct dpif *dpif_, struct dpif_linux_dp *reply,
>                   struct ofpbuf **bufp)
>  {
> @@ -1640,7 +1640,7 @@ dpif_linux_flow_to_ofpbuf(const struct dpif_linux_flow *flow,
>  }
>
>  /* Clears 'flow' to "empty" values. */
> -void
> +static void
>  dpif_linux_flow_init(struct dpif_linux_flow *flow)
>  {
>     memset(flow, 0, sizeof *flow);
> @@ -1652,7 +1652,7 @@ dpif_linux_flow_init(struct dpif_linux_flow *flow)
>  * result of the command is expected to be a flow also, which is decoded and
>  * stored in '*reply' and '*bufp'.  The caller must free '*bufp' when the reply
>  * is no longer needed ('reply' will contain pointers into '*bufp'). */
> -int
> +static int
>  dpif_linux_flow_transact(const struct dpif_linux_flow *request,
>                          struct dpif_linux_flow *reply, struct ofpbuf **bufp)
>  {
> diff --git a/ovsdb/execution.c b/ovsdb/execution.c
> index 708cc60..1768582 100644
> --- a/ovsdb/execution.c
> +++ b/ovsdb/execution.c
> @@ -200,7 +200,7 @@ exit:
>     return results;
>  }
>
> -struct ovsdb_error *
> +static struct ovsdb_error *
>  ovsdb_execute_commit(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>                      struct json *result OVS_UNUSED)
>  {
> @@ -270,7 +270,7 @@ parse_row(const struct json *json, const struct ovsdb_table *table,
>     }
>  }
>
> -struct ovsdb_error *
> +static struct ovsdb_error *
>  ovsdb_execute_insert(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>                      struct json *result)
>  {
> @@ -341,7 +341,7 @@ ovsdb_execute_insert(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>     return error;
>  }
>
> -struct ovsdb_error *
> +static struct ovsdb_error *
>  ovsdb_execute_select(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>                      struct json *result)
>  {
> @@ -408,7 +408,7 @@ update_row_cb(const struct ovsdb_row *row, void *ur_)
>     return true;
>  }
>
> -struct ovsdb_error *
> +static struct ovsdb_error *
>  ovsdb_execute_update(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>                      struct json *result)
>  {
> @@ -465,7 +465,7 @@ mutate_row_cb(const struct ovsdb_row *row, void *mr_)
>     return true;
>  }
>
> -struct ovsdb_error *
> +static struct ovsdb_error *
>  ovsdb_execute_mutate(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>                      struct json *result)
>  {
> @@ -522,7 +522,7 @@ delete_row_cb(const struct ovsdb_row *row, void *dr_)
>     return true;
>  }
>
> -struct ovsdb_error *
> +static struct ovsdb_error *
>  ovsdb_execute_delete(struct ovsdb_execution *x, struct ovsdb_parser *parser,
>                      struct json *result)
>  {
> diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c
> index fc9c604..379fc52 100644
> --- a/ovsdb/jsonrpc-server.c
> +++ b/ovsdb/jsonrpc-server.c
> @@ -1,4 +1,4 @@
> -/* Copyright (c) 2009, 2010 Nicira Networks
> +/* Copyright (c) 2009, 2010, 2011 Nicira Networks
>  *
>  * Licensed under the Apache License, Version 2.0 (the "License");
>  * you may not use this file except in compliance with the License.
> @@ -42,7 +42,7 @@ struct ovsdb_jsonrpc_remote;
>  struct ovsdb_jsonrpc_session;
>
>  /* Message rate-limiting. */
> -struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
> +static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
>
>  /* Sessions. */
>  static struct ovsdb_jsonrpc_session *ovsdb_jsonrpc_session_create(
> diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c
> index 40048b4..2d0ec12 100644
> --- a/utilities/ovs-dpctl.c
> +++ b/utilities/ovs-dpctl.c
> @@ -46,7 +46,7 @@
>  VLOG_DEFINE_THIS_MODULE(dpctl);
>
>  /* -s, --statistics: Print port statistics? */
> -bool print_statistics;
> +static bool print_statistics;
>
>  static const struct command all_commands[];
>
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list