[Hamlib-developer] [Hamlib/Hamlib] 0ddc6b: Fix MinGW64/MSYS2 w/GCC 15.1 warning
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <no...@gi...> - 2025-06-24 13:47:37
|
Branch: refs/heads/master Home: https://github.com/Hamlib/Hamlib Commit: 0ddc6bc8f41e597ba4c21df5256d6970c3d3ee6b https://github.com/Hamlib/Hamlib/commit/0ddc6bc8f41e597ba4c21df5256d6970c3d3ee6b Author: Nate Bargmann <n0...@n0...> Date: 2025-06-24 (Tue, 24 Jun 2025) Changed paths: M src/rig.c Log Message: ----------- Fix MinGW64/MSYS2 w/GCC 15.1 warning As reported by Steve, VK3SIR on the mailing list: On compilation, through a fully up-to-date MinGW64/MSYS2 environment, we receive the following warnings: .... make[3]: Entering directory '/home/sir/src/hamlib/build/src' CC rig.lo ../../src/src/rig.c: In function 'rig_init': ../../src/src/rig.c:624:45: warning: unknown conversion type character 'z' in format [-Wformat=] 624 | rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_struct\n", needed); | ^ ../../src/src/rig.c:624:32: warning: too many arguments for format [-Wformat-extra-args] 624 | rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_struct\n", needed); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/src/rig.c:657:45: warning: unknown conversion type character 'z' in format [-Wformat=] 657 | rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_cache\n", needed); | ^ ../../src/src/rig.c:657:32: warning: too many arguments for format [-Wformat-extra-args] 657 | rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_cache\n", needed); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC serial.lo .... The '%z' modifier is also found in rigs/icom/icom.c but with a 'u' conversion specifier. Turns out that since 'needed' in this function is of type 'size_t' which is an unsigned integer so the 'u' is required. To unsubscribe from these emails, change your notification settings at https://github.com/Hamlib/Hamlib/settings/notifications |