[ovs-dev] [PATCH 2/2] Suppress warnings about unused variables and functions.

Ben Pfaff blp at nicira.com
Fri Sep 27 23:28:09 UTC 2013


Thanks, I applied these.

On Fri, Sep 27, 2013 at 04:21:34PM -0700, Ethan Jackson wrote:
> Acked-by: Ethan Jackson <ethan at nicira.com>
> 
> 
> 
> On Thu, Sep 26, 2013 at 11:23 AM, Ben Pfaff <blp at nicira.com> wrote:
> > From: Jarno Rajahalme <jrajahalme at nicira.com>
> >
> > These variables and functions are unused but we don't want to remove
> > their definitions.
> >
> > Found by Clang.
> >
> > Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> >  lib/ofp-actions.c |    6 +++---
> >  lib/vlandev.c     |    2 +-
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> > index dcc82db..65430f3 100644
> > --- a/lib/ofp-actions.c
> > +++ b/lib/ofp-actions.c
> > @@ -884,14 +884,14 @@ ofpacts_from_openflow11(const union ofp_action *in, size_t n_in,
> >  /* OpenFlow 1.1 instructions. */
> >
> >  #define DEFINE_INST(ENUM, STRUCT, EXTENSIBLE, NAME)             \
> > -    static inline const struct STRUCT *                         \
> > +    static inline const struct STRUCT * OVS_UNUSED              \
> >      instruction_get_##ENUM(const struct ofp11_instruction *inst)\
> >      {                                                           \
> >          ovs_assert(inst->type == htons(ENUM));                  \
> >          return ALIGNED_CAST(struct STRUCT *, inst);             \
> >      }                                                           \
> >                                                                  \
> > -    static inline void                                          \
> > +    static inline void OVS_UNUSED                               \
> >      instruction_init_##ENUM(struct STRUCT *s)                   \
> >      {                                                           \
> >          memset(s, 0, sizeof *s);                                \
> > @@ -899,7 +899,7 @@ ofpacts_from_openflow11(const union ofp_action *in, size_t n_in,
> >          s->len = htons(sizeof *s);                              \
> >      }                                                           \
> >                                                                  \
> > -    static inline struct STRUCT *                               \
> > +    static inline struct STRUCT * OVS_UNUSED                    \
> >      instruction_put_##ENUM(struct ofpbuf *buf)                  \
> >      {                                                           \
> >          struct STRUCT *s = ofpbuf_put_uninit(buf, sizeof *s);   \
> > diff --git a/lib/vlandev.c b/lib/vlandev.c
> > index 282d28c..6531bf0 100644
> > --- a/lib/vlandev.c
> > +++ b/lib/vlandev.c
> > @@ -303,7 +303,7 @@ vlandev_stub_del(const char *vlan_dev OVS_UNUSED)
> >      return EOPNOTSUPP;
> >  }
> >
> > -static const struct vlandev_class vlandev_stub_class = {
> > +static const struct vlandev_class OVS_UNUSED vlandev_stub_class = {
> >      NULL,                       /* vd_refresh */
> >      vlandev_stub_add,
> >      vlandev_stub_del
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list