1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

test client remove abs modulo

llvm and gcc 5.3 do different things with it

https://github.com/warmcat/libwebsockets/issues/395

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-01-12 08:46:56 +08:00
parent 6711266a50
commit b6289d1153

View file

@ -170,11 +170,11 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
for (n = 0; n < 1; n++) {
lws_get_random(lws_get_context(wsi), rands, sizeof(rands));
l += sprintf((char *)&buf[LWS_PRE + l],
"c #%06X %d %d %d;",
(int)rands[0] & 0xffffff,
(int)abs(rands[1] % 500),
(int)abs(rands[2] % 250),
(int)abs(rands[3] % 24));
"c #%06X %u %u %u;",
rands[0] & 0xffffff, /* colour */
rands[1] & 511, /* x */
rands[2] & 255, /* y */
(rands[3] & 31) + 1); /* radius */
}
n = lws_write(wsi, &buf[LWS_PRE], l,