Hi. I'm having problems with some unsigned 32-bit variables (on a
msp430, tmote sky, tinyos 2.x).
With this code:
uint16_t a = 32000;
uint32_t b = 64000;
printf("a: %d (%d)\n", a, sizeof(a));
printf("b: %d (%d)\n", b, sizeof(b));
I get this output:
a: 32000 (2)
b: -1536 (0)
Why do I get this strange output for "b"?
David.
PS: I also get these compiler warnings, but I'm not sure how serious they are:
(for 2nd assignment) warning: decimal constant is so large that it is unsigned
(for 1st printf) warning: int format, different type arg (arg 2)
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help