[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 9b177cd8b3bcbc4712696
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-05-22 23:15:52
|
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 9b177cd8b3bcbc47126961377e6b14c689918af2 (commit) via 5fe81cdef4fcceff52c7cedc0eac6788c2f64881 (commit) from 91a4d914d9dd1a8aed8822e185109cacc143057c (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 9b177cd8b3bcbc47126961377e6b14c689918af2 Merge: 91a4d914d 5fe81cdef Author: Nate Bargmann <n0...@n0...> Date: Thu May 22 17:23:35 2025 -0500 Merge GitHub PR #1739. commit 5fe81cdef4fcceff52c7cedc0eac6788c2f64881 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat May 17 21:56:40 2025 +0200 Fix compilation errors and warnings and link failure Compile-tested with commit 8ea3f0e (tag: 3.4.10) from https://github.com/osmocom/libusrp Fixes: usrp_impl.cc:33:10: fatal error: usrp_standard.h: No such file or directory usrp_impl.cc:49:63: error: expected '(' before 'malloc' usrp_impl.cc:49:100: error: expected ')' before ';' token usrp_impl.cc:72:39: error: invalid 'static_cast' from type 'rig_state*' to type 'usrp_priv_data*' usrp_impl.cc:86:39: error: invalid 'static_cast' from type 'rig_state*' to type 'usrp_priv_data*' usrp_impl.cc:104:39: error: invalid 'static_cast' from type 'rig_state*' to type 'usrp_priv_data*' usrp_impl.cc:129:45: error: invalid 'static_cast' from type 'rig_state*' to type 'usrp_priv_data*' usrp_impl.cc:151:45: error: invalid 'static_cast' from type 'rig_state*' to type 'usrp_priv_data*' usrp_impl.cc:169:45: error: invalid 'static_cast' from type 'rig_state*' to type 'usrp_priv_data*' usrp_impl.cc:114:37: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] usrp_impl.cc:139:38: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] /usr/bin/ld: ../src/.libs/libhamlib.so: undefined reference to `usrp_caps' diff --git a/rigs/kit/usrp.c b/rigs/kit/usrp.c index 2e844788b..7b05ad1f5 100644 --- a/rigs/kit/usrp.c +++ b/rigs/kit/usrp.c @@ -19,6 +19,8 @@ * */ +#include <hamlib/config.h> + /* * Compile only this model if usrp is available */ diff --git a/rigs/kit/usrp_impl.cc b/rigs/kit/usrp_impl.cc index fd37f4875..7c1cc9e2a 100644 --- a/rigs/kit/usrp_impl.cc +++ b/rigs/kit/usrp_impl.cc @@ -30,7 +30,7 @@ #include <stdlib.h> #include <stdio.h> #include <errno.h> -#include <usrp_standard.h> +#include <usrp/usrp_standard.h> #include "usrp_impl.h" #include "token.h" @@ -46,7 +46,7 @@ struct usrp_priv_data { int usrp_init(RIG *rig) { // cppcheck-suppress leakReturnValNotUsed - STATE(rig)->priv = static_cast<struct usrp_priv_data*>malloc(sizeof(struct usrp_priv_data)); + STATE(rig)->priv = static_cast<struct usrp_priv_data*>(malloc(sizeof(struct usrp_priv_data))); if (!STATE(rig)->priv) { /* whoops! memory shortage! */ return -RIG_ENOMEM; @@ -69,7 +69,7 @@ int usrp_cleanup(RIG *rig) int usrp_open(RIG *rig) { - struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv; + struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv); int which_board = 0; int decim = 125; @@ -83,7 +83,7 @@ int usrp_open(RIG *rig) int usrp_close(RIG *rig) { - struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv; + struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv); if (!priv) { @@ -101,7 +101,7 @@ int usrp_close(RIG *rig) */ int usrp_set_conf(RIG *rig, hamlib_token_t token, const char *val) { - struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv; + struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv); if (!priv) { @@ -111,7 +111,7 @@ int usrp_set_conf(RIG *rig, hamlib_token_t token, const char *val) switch(token) { case TOK_IFMIXFREQ: - sscanf(val, "%"SCNfreq, &priv->if_mix_freq); + sscanf(val, "%" SCNfreq, &priv->if_mix_freq); break; default: return -RIG_EINVAL; @@ -126,7 +126,7 @@ int usrp_set_conf(RIG *rig, hamlib_token_t token, const char *val) */ int usrp_get_conf(RIG *rig, hamlib_token_t token, char *val) { - const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv; + const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv); if (!priv) { @@ -136,7 +136,7 @@ int usrp_get_conf(RIG *rig, hamlib_token_t token, char *val) switch(token) { case TOK_IFMIXFREQ: - sprintf(val, "%"PRIfreq, priv->if_mix_freq); + sprintf(val, "%" PRIfreq, priv->if_mix_freq); break; default: return -RIG_EINVAL; @@ -148,7 +148,7 @@ int usrp_get_conf(RIG *rig, hamlib_token_t token, char *val) int usrp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { - const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv; + const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv); int chan = 0; if (!priv) @@ -166,7 +166,7 @@ int usrp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) int usrp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { - const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv; + const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv); int chan = 0; if (!priv) ----------------------------------------------------------------------- Summary of changes: rigs/kit/usrp.c | 2 ++ rigs/kit/usrp_impl.cc | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |