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

Emanuel Taube emanuel.taube at gmail.com
Fri Feb 12 07:28:12 EST 2016


Inform the compiler that the variables are not gona be used to avoid
compiler warnings.

Signed-off-by: Emanuel Taube <emanuel.taube at gmail.com>

diff --git a/libubus.h b/libubus.h
index 08dac49..3234df4 100644
--- a/libubus.h
+++ b/libubus.h
@@ -289,6 +289,7 @@ static inline void ubus_defer_request(struct ubus_context *ctx,
 				      struct ubus_request_data *req,
 				      struct ubus_request_data *new_req)
 {
+    (void) ctx;
     memcpy(new_req, req, sizeof(*req));
     req->deferred = true;
 }
@@ -296,6 +297,7 @@ static inline void ubus_defer_request(struct ubus_context *ctx,
 static inline void ubus_request_set_fd(struct ubus_context *ctx,
 				       struct ubus_request_data *req, int fd)
 {
+    (void) ctx;
     req->fd = fd;
 }
 
-- 
2.7.0
_______________________________________________
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