Hello,
this error is not related to any DHT library and the error is reported by clang. It is know unsolved issue for years. So if the studio generates a bin file then just ignore this clang error or try this
Here you can found library what is 100% working -Mbed-CE Libraries & Examples (github.com)
BR, Jan