esp8266-devkit icon indicating copy to clipboard operation
esp8266-devkit copied to clipboard

samples error large Integer

Open arnold-b opened this issue 8 years ago • 0 comments

Hello,

there are many samples which have and integer error like this: delay_us is just defined as unsigned int. and that means only 16 bit. 1000*1000 are already more.

CC driver/dht22.c driver/dht22.c: In function 'DHTRead': driver/dht22.c:71:10: error: large integer implicitly truncated to unsigned type [-Werror=overflow] sleepms(250); ^ driver/dht22.c:30:32: note: in definition of macro 'sleepms' #define sleepms(x) os_delay_us(x*1000); ^ cc1.exe: all warnings being treated as errors mingw32-make.exe: *** [build/driver/dht22.o] Error 1 ../common_nonos.mk:351: recipe for target 'build/driver/dht22.o' failed

20:46:55 Build Finished (took 6s.623ms)

arnold-b avatar Jan 04 '18 13:01 arnold-b