From 2f22892681640a7c536d0c8bb2a9296c97e09c46 Mon Sep 17 00:00:00 2001 From: George Nash Date: Mon, 7 Aug 2017 14:40:26 -0700 Subject: [PATCH] IOT-2539 Cleanup unused-parameter warning This is a set of code that will sometimes have a warning depending on what is defined. To prevent the unused-parameter warning the parameters are cast to void. A empty operation that will be compiled out but prevents the warning. Bug: https://jira.iotivity.org/browse/IOT-2539 Change-Id: I08c73fb565b62d3a760956976a012331863a6c73 Signed-off-by: George Nash Reviewed-on: https://gerrit.iotivity.org/gerrit/21769 Tested-by: jenkins-iotivity Reviewed-by: Dan Mihai (cherry picked from commit 598e8c5b7e7ad9cfc6fab77f5843e5e390509728) --- resource/csdk/connectivity/lib/libcoap-4.1.1/debug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resource/csdk/connectivity/lib/libcoap-4.1.1/debug.c b/resource/csdk/connectivity/lib/libcoap-4.1.1/debug.c index 215e4d4..504d632 100644 --- a/resource/csdk/connectivity/lib/libcoap-4.1.1/debug.c +++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/debug.c @@ -140,6 +140,11 @@ print_readable(const unsigned char *data, unsigned int len, unsigned char *resul size_t coap_print_addr(const struct coap_address_t *addr, unsigned char *buf, size_t len) { + // Depending on what is defined its possible that the input parameters + // are not used. Cast them to void avoid unused-parameter warnings + (void)addr; + (void)buf; + (void)len; #if defined(HAVE_ARPA_INET_H) || defined(_WIN32) const void *addrptr = NULL; #if defined(__ANDROID__) -- 2.7.4