I use nesc on tinyos 2.1 and I read that I can use uint8_t ,uint16_t ,uint32_t and uint64_t as unsigned int 8 bit,unsigned int 16 bit,unsigned int 32 bit and unsigned int 64 bit but when I use uint16_t and assign to it a value higher than 32000 I obtain a warning that is :
GestioneP.nc:13: warning: decimal constant is so large that it is unsigned module GestioneP{ uses interface Boot; uses interface Timer<TMilli> as Ti; } implementation{ uint16_t dim = 0; uint32_t dim1 = 0; event void Boot.booted(){ dim = 65000;//this is the line of warning dim1= 228255; call Ti.startOneShot(10000); } event void Ti.fired(){ printf("dim %ud %lud\n ",dim,dim1); printfflush(); dim = dim -10; dim1 = dim1 -10; printf("dim %ud %lud\n ",dim,dim1); printfflush(); if(dim < 65535) printf("dim minore di 65535\n"); if(dim1 < 228255) printf("dim1 minore di 228255\n"); } } My doubt is about is defined a variable that is a global variable is not instantiate still you don't use it ?If I have defined uint32_t dim =0; why I obtain that warning on dim = 65000 ? thank in advance to all have a suggestion or a link to documentation that I haven't read Giorgio _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help