AVSystem / Anjay-mbedos-client

Apache License 2.0
3 stars 6 forks source link

Multiople comparison is always true due to limited range of data type [-Wtype-limits] #4

Open JanneKiiskila opened 2 years ago

JanneKiiskila commented 2 years ago

From master with hash; https://github.com/AVSystem/Anjay-mbedos-client/commit/884f2732b6ff3908df8c48507bd3c50625519277

Multiple compiler warnings that look a bit worrying.

Compile [  1.0%]: avs_coap_async_client.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  1.1%]: XNucleoIKS01A2.cpp
Compile [  1.1%]: avs_coap_exchange.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  1.2%]: avs_coap_async_server.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  1.3%]: avs_coap_code_utils.c
Compile [  1.4%]: avs_coap_common_utils.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  1.5%]: avs_coap_observe.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  1.6%]: avs_coap_ctx.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  1.7%]: accelerometer.cpp
Compile [  1.8%]: avs_coap_iterator.c
Compile [  1.8%]: avs_coap_option.c
Compile [  1.9%]: avs_coap_streaming_client.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  2.0%]: avs_coap_options.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  2.1%]: avs_coap_streaming_server.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  2.2%]: avs_coap_udp_msg.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  2.3%]: avs_coap_udp_tx_params.c
Compile [  2.4%]: avs_coap_udp_msg_cache.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  2.5%]: avs_coap_udp_ctx.c
[Warning] avs_coap_ctx.h@41,31: comparison is always true due to limited range of data type [-Wtype-limits]
Compile [  2.6%]: anjay_access_utils.c