Another way to do it is to specify the type of the constant:
const uint16_t FT_TIMER_MIN = 60000U;

The U makes it an unsigned int constant. You can also append an L to make it
a long:
const uint32_t ONE_MILLION = 1000000UL;

HTH,
Michiel

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:tinyos-help-
> [EMAIL PROTECTED] On Behalf Of Hristo Bojkov
> Sent: woensdag 19 december 2007 14:01
> To: Tinyos-help
> Subject: [Tinyos-help] Re: Is uint16_t a unsigned int type?
> 
> Sorry. Ignore my last mail. I didn't catch that it is complaining not
> for the type of the variable, rather for the constant in the declaration.
> So I have changed the line to be:
> / *********/
> const uint16_t FT_TIMER_MIN = (uint16_t)60000;
> / *********/
> And there is no warning any more.
> 
> Regards
> Hristo Bojkov

_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to