From d9d20d906b7df646248298938991b72cd18f1c13 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 12 Mar 2015 13:05:56 +0100 Subject: [PATCH] rd.c: Fixed type-specifier warning For POSIX, coap_tick_t is defined as unsigned long to support timestamps in wallclock time. The rd uses ticks to make node identifiers locally unique. As this is just one part of the generated identifier, the timestamp's lower 32 bits are sufficient. --- examples/rd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/rd.c b/examples/rd.c index edf0e7e8..3beae6b0 100644 --- a/examples/rd.c +++ b/examples/rd.c @@ -420,7 +420,7 @@ hnd_post_rd(coap_context_t *ctx, struct coap_resource_t *resource UNUSED_PARAM, loc_size += snprintf((char *)(loc + loc_size), LOCSIZE - loc_size - 1, - "-%x", now); + "-%x", (unsigned int)(now & (unsigned int)-1)); } } }