[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 3ea25e6ba072cd1e4c2c2
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2025-09-21 23:19:40
|
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 3ea25e6ba072cd1e4c2c2095927ee0e9c805d3c9 (commit)
via df975aaf12cc60686909535f5b8208895a35f1c6 (commit)
via aa665d1e1976131d78df7203893d57b6b004cf4a (commit)
via 4c3cf66d84f606b4f339a6f615c16532b1fcb0c4 (commit)
from 15d1fab7e889db8594ca07ee34607e3c97372727 (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 3ea25e6ba072cd1e4c2c2095927ee0e9c805d3c9
Merge: 15d1fab7e df975aaf1
Author: Nate Bargmann <n0...@n0...>
Date: Sat Sep 20 12:45:55 2025 -0500
Merge GitHub PR #1918
commit df975aaf12cc60686909535f5b8208895a35f1c6
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Sat Sep 20 18:34:08 2025 +0200
Fix compiler warnings issued by clang
Fixes:
hamlibpy_wrap.c:4692:35: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
4692 | count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term);
| ^~~~
../include/hamlib/rig.h:3466:71: note: passing argument to parameter 'send' here
3466 | extern HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char* send, int send_len, unsigned char* reply, int reply_len, unsigned char *term);
| ^
hamlibpy_wrap.c:4692:76: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
4692 | count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term);
| ^~~~
../include/hamlib/rig.h:3466:143: note: passing argument to parameter 'term' here
3466 | extern HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char* send, int send_len, unsigned char* reply, int reply_len, unsigned char *term);
| ^
hamlibpy_wrap.c:4696:39: warning: passing 'unsigned char[256]' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
4696 | return PyUnicode_FromStringAndSize(reply_buffer, count);
| ^~~~~~~~~~~~
/usr/include/python3.13/unicodeobject.h:123:17: note: passing argument to parameter 'u' here
123 | const char *u, /* UTF-8 encoded string */
| ^
hamlibpy_wrap.c:4698:37: warning: passing 'unsigned char[256]' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
4698 | return PyBytes_FromStringAndSize(reply_buffer, count);
| ^~~~~~~~~~~~
/usr/include/python3.13/bytesobject.h:31:62: note: passing argument to parameter here
31 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
| ^
diff --git a/bindings/rig.swg b/bindings/rig.swg
index eca597902..663a1c77f 100644
--- a/bindings/rig.swg
+++ b/bindings/rig.swg
@@ -742,7 +742,7 @@ int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line
PyObject *bytes_obj;
Py_ssize_t send_len;
int reply_len = MAX_RETURNSTR;
- unsigned char reply_buffer[MAX_RETURNSTR];
+ char reply_buffer[MAX_RETURNSTR];
int count;
if (PyUnicode_Check(send_obj)) {
@@ -771,7 +771,7 @@ int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line
return NULL;
}
- count = rig_send_raw(self->rig, send, send_len, reply_buffer, reply_len, term);
+ count = rig_send_raw(self->rig, (unsigned char *)send, send_len, (unsigned char *)reply_buffer, reply_len, (unsigned char *)term);
self->error_status = count < 0 ? count : RIG_OK;
if (PyUnicode_Check(send_obj)) {
commit aa665d1e1976131d78df7203893d57b6b004cf4a
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Thu Sep 18 21:33:29 2025 +0200
Fix compiler warning issued by clang
Fixes:
hamlibpy_wrap.c:4668:46: warning: passing 'size_t *' (aka 'unsigned long *') to parameter of type 'Py_ssize_t *' (aka 'long *') converts between pointers to integer types with different sign [-Wpointer-sign]
4668 | PyBytes_AsStringAndSize(bytes_obj, &send, &send_len);
| ^~~~~~~~~
diff --git a/bindings/rig.swg b/bindings/rig.swg
index 76ef22df7..eca597902 100644
--- a/bindings/rig.swg
+++ b/bindings/rig.swg
@@ -740,7 +740,7 @@ int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line
{
char *send, *term;
PyObject *bytes_obj;
- size_t send_len;
+ Py_ssize_t send_len;
int reply_len = MAX_RETURNSTR;
unsigned char reply_buffer[MAX_RETURNSTR];
int count;
commit 4c3cf66d84f606b4f339a6f615c16532b1fcb0c4
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Thu Sep 18 21:28:35 2025 +0200
Fix compiler warnings issued by clang
Fixes:
hamlibpy_wrap.c:4194:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4194 | return RIG_OK;
| ^~~~~~
hamlibpy_wrap.c:4213:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4213 | return RIG_OK;
| ^~~~~~
hamlibpy_wrap.c:4230:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4230 | return RIG_OK;
| ^~~~~~
hamlibpy_wrap.c:4248:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4248 | return RIG_OK;
| ^~~~~~
hamlibpy_wrap.c:4266:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4266 | return RIG_OK;
| ^~~~~~
hamlibpy_wrap.c:4282:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4282 | return RIG_OK;
| ^~~~~~
hamlibpy_wrap.c:4298:12: warning: expression which evaluates to zero treated as a null pointer constant of type 'int *' [-Wnon-literal-null-conversion]
4298 | return RIG_OK;
| ^~~~~~
diff --git a/bindings/rig.swg b/bindings/rig.swg
index 9261058f8..76ef22df7 100644
--- a/bindings/rig.swg
+++ b/bindings/rig.swg
@@ -82,7 +82,7 @@ typedef channel_t * channel_t_p;
typedef channel_t * const_channel_t_p;
#ifdef SWIGPYTHON
-int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg)
+int rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
@@ -99,7 +99,7 @@ int *rig_freq_cb_python(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg)
return RIG_OK;
}
-int *rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, rig_ptr_t arg)
+int rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
@@ -118,7 +118,7 @@ int *rig_mode_cb_python(RIG *rig, vfo_t vfo, rmode_t rmode, pbwidth_t pbwidth, r
return RIG_OK;
}
-int *rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg)
+int rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
@@ -135,7 +135,7 @@ int *rig_vfo_cb_python(RIG *rig, vfo_t vfo, rig_ptr_t arg)
return RIG_OK;
}
-int *rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg)
+int rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
@@ -153,7 +153,7 @@ int *rig_ptt_cb_python(RIG *rig, vfo_t vfo, ptt_t ptt, rig_ptr_t arg)
return RIG_OK;
}
-int *rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg)
+int rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
@@ -171,7 +171,7 @@ int *rig_dcd_cb_python(RIG *rig, vfo_t vfo, dcd_t dcd, rig_ptr_t arg)
return RIG_OK;
}
-int *rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbwidth_t *pbwidth, rig_ptr_t arg)
+int rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbwidth_t *pbwidth, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
@@ -187,7 +187,7 @@ int *rig_pltune_cb_python(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *rmode, pbw
return RIG_OK;
}
-int *rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line, rig_ptr_t arg)
+int rig_spectrum_cb_python(RIG *rig, struct rig_spectrum_line *rig_spectrum_line, rig_ptr_t arg)
{
Rig *self = arg;
PyObject *python_arguments;
-----------------------------------------------------------------------
Summary of changes:
bindings/rig.swg | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|