Mercurial > louis > mq > lightsd
changeset 476:e71203a47b63
wip fix build warnings
author | Louis Opter <kalessin@kalessin.fr> |
---|---|
date | Sat, 25 Jun 2016 17:42:20 -0700 |
parents | 0ade7fb71c8c |
children | edb24f9016ad |
files | add_power_transition.patch fix_build_warnings.patch series |
diffstat | 3 files changed, 42 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/add_power_transition.patch Sat Jun 25 17:00:58 2016 -0700 +++ b/add_power_transition.patch Sat Jun 25 17:42:20 2016 -0700 @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 37abecb2b0d3417349a2081a541cfbe4609f6892 +# Parent c8cac4ab39f01e6d391de3a1e36889359410d810 Add a transition argument to the power functions Unlike LIFX's implementation, lightsd will properly get the bulbs to @@ -844,22 +844,23 @@ ----------------- -.. function:: power_off(target) +- +- Power off the given bulb(s). +.. function:: power_off(target[, transition]) -- Power off the given bulb(s). +-.. function:: power_on(target) + Power off the given bulb(s) with an optional transition. --.. function:: power_on(target) +- Power on the given bulb(s). + :param int transition: Optional time in ms it will take for the bulb to turn + off. -- Power on the given bulb(s). +-.. function:: power_toggle(target) +.. function:: power_on(target[, transition]) --.. function:: power_toggle(target) +- Power on (if they are off) or power off (if they are on) the given bulb(s). + Power on the given bulb(s) with an optional transition. - -- Power on (if they are off) or power off (if they are on) the given bulb(s). ++ + :param int transition: Optional time in ms it will take for the bulb to turn + on. + @@ -2963,7 +2964,7 @@ + struct lgtd_lifx_packet_light_color *pkt_brightness = pkt; + if (pkt_type != LGTD_LIFX_SET_LIGHT_COLOR) { + lgtd_errx( -+ 1, "router_send_to_device: pkt_type %u (expected %U)", ++ 1, "router_send_to_device: pkt_type %u (expected %u)", + pkt_type, LGTD_LIFX_SET_LIGHT_COLOR + ); + }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fix_build_warnings.patch Sat Jun 25 17:42:20 2016 -0700 @@ -0,0 +1,32 @@ +# HG changeset patch +# Parent 146b6e2aee4c4b8dcc2d8f7791c8e1e5795f1cbb +Fix build warnings in the broadcast's module tests and lightsd.c + +diff --git a/core/lightsd.c b/core/lightsd.c +--- a/core/lightsd.c ++++ b/core/lightsd.c +@@ -79,7 +79,7 @@ + static void + lgtd_signal_event_callback(int signum, short events, void *ctx) + { +- int i = (int)ctx; ++ intptr_t i = (intptr_t)ctx; + assert(i >= 0); + assert(i < (int)LGTD_ARRAY_SIZE(lgtd_signals)); + assert(i < (int)LGTD_ARRAY_SIZE(lgtd_signal_evs)); +diff --git a/tests/lifx/broadcast/test_broadcast_write_callback_getifaddrs_fails.c b/tests/lifx/broadcast/test_broadcast_write_callback_getifaddrs_fails.c +--- a/tests/lifx/broadcast/test_broadcast_write_callback_getifaddrs_fails.c ++++ b/tests/lifx/broadcast/test_broadcast_write_callback_getifaddrs_fails.c +@@ -27,12 +27,6 @@ + + enum { MOCK_SOCKET_FD = 32 }; + static struct event *MOCK_WRITE_EV = (struct event *)0x7061726973; +-static const struct sockaddr_in LIFX_BROADCAST_ADDR = { +- .sin_family = AF_INET, +- .sin_addr = { INADDR_BROADCAST }, +- .sin_port = LGTD_STATIC_HTONS(LGTD_LIFX_PROTOCOL_PORT), +- .sin_zero = { 0 } +-}; + + static int event_del_call_count = 0; +
--- a/series Sat Jun 25 17:00:58 2016 -0700 +++ b/series Sat Jun 25 17:42:20 2016 -0700 @@ -5,6 +5,7 @@ fix_stack_underflow_in_jsonrpc.patch fix_stack_overflow_in_jsmn.patch use_systemd_user_group_keys.patch +fix_build_warnings.patch add_power_transition.patch open_gateway_on_any_bulb_response.patch #+future make_gateway_write_callbacks_low_priority.patch #+future