[OpenWrt-Devel] [PATCH] libubus.h: marking unused variables

Emanuel Taube emanuel.taube at gmail.com
Fri Feb 12 06:11:39 EST 2016


2016-02-12 8:44 GMT+01:00 John Crispin <blogic at openwrt.org>:

>
>
> On 10/02/2016 14:04, Emanuel Taube wrote:
> >
> > diff --git a/libubus.h b/libubus.h
> > index 08dac49..d419205 100644
> > --- a/libubus.h
> > +++ b/libubus.h
> > @@ -285,7 +285,7 @@ int ubus_invoke_async(struct ubus_context *ctx,
> uint32_t obj, const char *method
> >  int ubus_send_reply(struct ubus_context *ctx, struct ubus_request_data
> *req,
> >                   struct blob_attr *msg);
> >
> > -static inline void ubus_defer_request(struct ubus_context *ctx,
> > +static inline void ubus_defer_request(struct ubus_context *ctx
> __attribute__((__unused__)),
> >                                     struct ubus_request_data *req,
> >                                     struct ubus_request_data *new_req)
> >  {
> > @@ -293,7 +293,7 @@ static inline void ubus_defer_request(struct
> ubus_context *ctx,
> >      req->deferred = true;
> >  }
> >
> > -static inline void ubus_request_set_fd(struct ubus_context *ctx,
> > +static inline void ubus_request_set_fd(struct ubus_context *ctx
> __attribute__((__unused__)),
> >                                      struct ubus_request_data *req, int
> fd)
> >  {
> >      req->fd = fd;
> >
>
> Hi,
>
> i am not sure what issue it solves. i have the suspicion that you are
> using a 3rd party app that links this lib and uses awesome gcc compile
> flags that blow up without this patch. could you explain the purpose of
> this patch ?
>
>
Hi,

the purpose is to be able to compile anything with -Wextra (especially
-Wunused-parameter) together with -Werror against this lib.

Regards,
Emanuel

        Johh
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160212/11c573e6/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list