Browse Source

pkg: iotivity: Hide put_light function if not needed

Without this change it fails to build from source:
   client_switch.c:80:1:\
   error: ‘put_light’ defined but not used [-Werror=unused-function]

At least with BOARD=arduino-mega2560, now all iotivity examples are building.

Bug: https://github.com/RIOT-OS/RIOT/issues/6241
Change-Id: I6b2af5ab6b8bf20e848dcd30d580990006c950e7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
pr/spi.typo
Philippe Coval 6 years ago
parent
commit
d587cf38df
  1. 2
      examples/iotivity_examples/client_switch/client_switch.c

2
examples/iotivity_examples/client_switch/client_switch.c

@ -76,6 +76,7 @@ stop_observe(void *data)
return DONE;
}
#ifdef BUTTON_GPIO
static void
put_light(oc_client_response_t *data)
{
@ -87,6 +88,7 @@ put_light(oc_client_response_t *data)
PRINT("client_oic: PUT response code %d\n", data->code);
}
}
#endif
static void
observe_light(oc_client_response_t *data)

Loading…
Cancel
Save