Azure / azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
https://azure.github.io/azure-iot-sdk-c
Other
585 stars 739 forks source link

Compile Error on Alpine #2530

Closed acode-x closed 11 months ago

acode-x commented 11 months ago

Development Machine, OS, Compiler (and Other Relevant Toolchain Info)

SDK Version: LTS_08_2023

Protocol: MQTT

Describe the Bug

image

CIPop commented 11 months ago

The warning is discussed in https://stackoverflow.com/questions/47450718/gcc7-2-argument-range-exceeds-maximum-object-size-9-7-werror-alloc-size-larg and https://gcc.gnu.org/bugzilla//show_bug.cgi?id=85783.

This is very likely a false positive as both operands should be fairly small and never exceed the maximum value of size_t.

My recommendation is to disable this warning (set compileOption_C to have -Wno-alloc-size-larger-than ). E.g. in ccmake ..: image

acode-x commented 11 months ago

Thanks CIPop. I'll suppress this warning for now.