[Tinyos-help] Bug in NesC or a simple error.........???

Michael Schippling schip at santafe.edu
Thu Jan 25 11:21:10 PST 2007


It's possible that the complain is about "(1000)*random)" which is
(probably) still a uint16. Try putting the cast inside the parens.
MS

Miguel Pereira wrote:
> Hi,
> 
> In the last few days, when I execute the command "make telosb" and I 
> compile the code I'm having a little bit difficulty of making disappear 
> one warning.
> "Decimal constant is so large that it is unsigned"
> The line where this occur is the following -> result = (uint64_t) ( 
> ((1000)*random) /65535);
> The variable result is uint64_t and random is uint16_t.
> I have two consideration to make, first, the warning shouldn't exist 
> because the variable result with 64 should handle with the size of 
> number. Second, if I'm making the cast uint64_t, why informs me that the 
> number will be unsigned?
> 
> If anyone can help me with this warning I will appreciate.
> 
> Thanks for any help.
> 
> Miguel Pereira
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


More information about the Tinyos-help mailing list