[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 0ddc6bc8f41e597ba4c21
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-06-24 13:51:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 0ddc6bc8f41e597ba4c21df5256d6970c3d3ee6b (commit) from dc12b01aed6b4449e42ff57e71f3687b1b837a20 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0ddc6bc8f41e597ba4c21df5256d6970c3d3ee6b Author: Nate Bargmann <n0...@n0...> Date: Tue Jun 24 07:43:37 2025 -0500 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. diff --git a/src/rig.c b/src/rig.c index 951d1c004..b2958407a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -621,7 +621,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) * and especially the callbacks */ needed = sizeof(RIG); - rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_struct\n", needed); + rig_debug(RIG_DEBUG_TRACE, "Requesting %zu bytes for rig_struct\n", needed); rig = calloc(1, needed); if (rig == NULL) @@ -654,7 +654,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) // Allocate space for cached data needed = sizeof(struct rig_cache); - rig_debug(RIG_DEBUG_TRACE, "Requesting %zd bytes for rig_cache\n", needed); + rig_debug(RIG_DEBUG_TRACE, "Requesting %zu bytes for rig_cache\n", needed); CACHE(rig) = calloc(1, needed); if (!CACHE(rig)) { ----------------------------------------------------------------------- Summary of changes: src/rig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |