Skip to content

samples error large Integer #47

@arnold-b

Description

@arnold-b

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions