[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. v4.0rc1-88-g110cfe7a
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-09-03 03:14:05
|
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 110cfe7abda137c71026604c4afc19f34ed0f8b5 (commit) via fade1681faf6dcea09133e02a1603af4897fb61e (commit) via dd3b1b71d0e80598119f194686fedc460b2045fc (commit) from a0ee4d01b2e16c01f56d7a2fa08fb456a23fc894 (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 110cfe7abda137c71026604c4afc19f34ed0f8b5 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Sep 2 22:13:11 2020 -0500 Remove warning from ampctl.c diff --git a/tests/ampctl.c b/tests/ampctl.c index cbd8da64..9c54b0f4 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -49,7 +49,6 @@ extern char *readline(); #else /* no readline */ #endif /* HAVE_LIBREADLINE */ -#warn here1 #ifdef HAVE_READLINE_HISTORY # include <sys/stat.h> # define HST_SHRT_OPTS "iI" commit fade1681faf6dcea09133e02a1603af4897fb61e Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Sep 2 16:56:11 2020 -0500 Fix cppcheck errors and warnings diff --git a/dummy/dummy.c b/dummy/dummy.c index 6e748861..85682c63 100644 --- a/dummy/dummy.c +++ b/dummy/dummy.c @@ -1061,7 +1061,6 @@ static int dummy_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) // cppcheck-suppress * level1 = LVL_ATT; - // cppcheck-suppress * level2 = LVL_PREAMP; curr->levels[idx].i = qrm + (time(NULL) % 32) + (rand() % 4) - curr->levels[level1].i + curr->levels[level2].i; diff --git a/rigs/aor/aor.c b/rigs/aor/aor.c index 9b3fb372..5b3d18bc 100644 --- a/rigs/aor/aor.c +++ b/rigs/aor/aor.c @@ -1048,7 +1048,6 @@ int aor_set_channel(RIG *rig, const channel_t *chan) cmd_len += priv->format_mode(rig, aorcmd + cmd_len, chan->mode, chan->width); - // cppcheck-suppress * cmd_len += sprintf(aorcmd + cmd_len, " AT%d TM%12s%s", chan->levels[LVL_ATT].i ? 1 : 0, chan->channel_desc, EOM); diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 4165206d..18aebb4d 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -128,7 +128,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, /* * should check return code and that write wrote cmd_len chars! */ - // cppcheck-suppress * Hold_Decode(rig); rig_flush(&rs->rigport); @@ -137,7 +136,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, if (retval != RIG_OK) { - // cppcheck-suppress * Unhold_Decode(rig); return retval; } @@ -159,7 +157,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, if (retval == -RIG_ETIMEOUT || retval == 0) { /* Nothing received, CI-V interface is not echoing */ - // cppcheck-suppress * Unhold_Decode(rig); return -RIG_BUSERROR; } @@ -167,8 +164,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, if (retval < 0) { /* Other error, return it */ - // cppcheck-suppress * - Unhold_Decode(rig); return retval; } @@ -181,7 +176,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, { case COL: /* Collision */ - // cppcheck-suppress * Unhold_Decode(rig); return -RIG_BUSBUSY; @@ -192,7 +186,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, default: /* Timeout after reading at least one character */ /* Problem on ci-v bus? */ - // cppcheck-suppress * Unhold_Decode(rig); return -RIG_BUSERROR; } @@ -202,7 +195,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, /* Not the same length??? */ /* Problem on ci-v bus? */ /* Someone else got a packet in? */ - // cppcheck-suppress * Unhold_Decode(rig); return -RIG_EPROTO; } @@ -212,7 +204,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, /* Frames are different? */ /* Problem on ci-v bus? */ /* Someone else got a packet in? */ - // cppcheck-suppress * Unhold_Decode(rig); return -RIG_EPROTO; } @@ -223,7 +214,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, */ if (data_len == NULL) { - // cppcheck-suppress * Unhold_Decode(rig); return RIG_OK; } @@ -244,7 +234,6 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd, frm_len = read_icom_frame(&rs->rigport, buf, sizeof(buf)); } - // cppcheck-suppress * Unhold_Decode(rig); if (frm_len < 0) diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 846acdfd..446e3924 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1870,13 +1870,19 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) * Lets check for dsp filters */ - if (width && (retval = icom_get_dsp_flt(rig, *mode)) != 0) + if (width != NULL && (retval = icom_get_dsp_flt(rig, *mode)) != 0) { *width = retval; + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s returning mode=%s, width=%d\n", __func__, + rig_strvfo(vfo), rig_strrmode(*mode), (int)*width); + } + else + { + rig_debug(RIG_DEBUG_TRACE, + "%s: vfo=%s returning mode=%s, width not available\n", __func__, + rig_strvfo(vfo), rig_strrmode(*mode)); } - rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s returning mode=%s, width=%d\n", __func__, - rig_strvfo(vfo), rig_strrmode(*mode), (int)*width); return RIG_OK; } diff --git a/rigs/jrc/jrc.c b/rigs/jrc/jrc.c index c4bf4e11..5e08bd5e 100644 --- a/rigs/jrc/jrc.c +++ b/rigs/jrc/jrc.c @@ -77,7 +77,6 @@ static int jrc_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, rig_flush(&rs->rigport); - // cppcheck-suppress * Hold_Decode(rig); retval = write_block(&rs->rigport, cmd, cmd_len); diff --git a/rigs/kenwood/ts950.c b/rigs/kenwood/ts950.c index 08e08378..40540a39 100644 --- a/rigs/kenwood/ts950.c +++ b/rigs/kenwood/ts950.c @@ -217,8 +217,8 @@ const struct rig_caps ts950sdx_caps = .serial_parity = RIG_PARITY_NONE, .serial_handshake = RIG_HANDSHAKE_NONE, .write_delay = 0, - .post_write_delay = 0, - .timeout = 500, // this rig takes over 250ms to respond an IF command + .post_write_delay = 50, + .timeout = 600, // this rig takes over 250ms to respond an IF command .retry = 10, .has_get_func = RIG_FUNC_NONE, diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c index 0b841a9d..01424046 100644 --- a/rigs/prm80/prm80.c +++ b/rigs/prm80/prm80.c @@ -441,13 +441,11 @@ int prm80_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) switch (level) { case RIG_LEVEL_AF: - // cppcheck-suppress * val->f = chan.levels[LVL_AF].f; break; case RIG_LEVEL_SQL: - // cppcheck-suppress * val->f = chan.levels[LVL_SQL].f; break; diff --git a/rigs/tentec/tt550.c b/rigs/tentec/tt550.c index d910683d..414ba79a 100644 --- a/rigs/tentec/tt550.c +++ b/rigs/tentec/tt550.c @@ -82,7 +82,6 @@ tt550_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, * Hold_Decode keeps the asynchronous decode routine from being called * when we get data back from a normal command. */ - // cppcheck-suppress * Hold_Decode(rig); rig_flush(&rs->rigport); @@ -91,7 +90,6 @@ tt550_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, if (retval != RIG_OK) { - // cppcheck-suppress * Unhold_Decode(rig); return retval; } @@ -101,7 +99,6 @@ tt550_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, */ if (!data || !data_len) { - // cppcheck-suppress * Unhold_Decode(rig); return 0; } @@ -120,7 +117,6 @@ tt550_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, *data_len = retval; - // cppcheck-suppress * Unhold_Decode(rig); return RIG_OK; diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index befa3887..6a37a7aa 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -769,7 +769,6 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) to_bcd(p->p_cmd, freq / 10, 8); /* store bcd format in in p_cmd */ /* TODO -- fix 10Hz resolution -- FS */ - // cppcheck-suppress * rig_debug(RIG_DEBUG_TRACE, "%s: requested freq after conversion = %"PRIll" Hz\n", __func__, (int64_t)from_bcd(p->p_cmd, 8) * 10); diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 97b7586e..d9d1fe3e 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -443,10 +443,8 @@ int ft817_init(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); - // cppcheck-suppress * if ((rig->state.priv = calloc(1, sizeof(struct ft817_priv_data))) == NULL) { - // cppcheck-suppress * return -RIG_ENOMEM; } @@ -455,7 +453,6 @@ int ft817_init(RIG *rig) /* Copy complete native cmd set to private cmd storage area */ memcpy(priv->pcs, ncmd, sizeof(ncmd)); - // cppcheck-suppress * return RIG_OK; } diff --git a/rigs/yaesu/ft857.c b/rigs/yaesu/ft857.c index 38811e46..aa084df3 100644 --- a/rigs/yaesu/ft857.c +++ b/rigs/yaesu/ft857.c @@ -298,10 +298,8 @@ int ft857_init(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__); - // cppcheck-suppress * if ((rig->state.priv = calloc(1, sizeof(struct ft857_priv_data))) == NULL) { - // cppcheck-suppress * return -RIG_ENOMEM; } @@ -310,7 +308,6 @@ int ft857_init(RIG *rig) /* Copy complete native cmd set to private cmd storage area */ memcpy(priv->pcs, ncmd, sizeof(ncmd)); - // cppcheck-suppress * return RIG_OK; } diff --git a/rigs/yaesu/ft897.c b/rigs/yaesu/ft897.c index beae23da..ff489c4f 100644 --- a/rigs/yaesu/ft897.c +++ b/rigs/yaesu/ft897.c @@ -334,10 +334,8 @@ int ft897_init(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); - // cppcheck-suppress * if ((rig->state.priv = calloc(1, sizeof(struct ft897_priv_data))) == NULL) { - // cppcheck-suppress * return -RIG_ENOMEM; } @@ -346,7 +344,6 @@ int ft897_init(RIG *rig) /* Copy complete native cmd set to private cmd storage area */ memcpy(priv->pcs, ncmd, sizeof(ncmd)); - // cppcheck-suppress * return RIG_OK; } diff --git a/src/microham.c b/src/microham.c index 6d5a0953..49cc6ba9 100644 --- a/src/microham.c +++ b/src/microham.c @@ -251,7 +251,6 @@ static void close_microham() #define NUMUHTYPES 9 static struct uhtypes { - // cppcheck-suppress * const char *name; const char *device; } uhtypes[NUMUHTYPES] = diff --git a/src/misc.c b/src/misc.c index 564277d0..a8c81175 100644 --- a/src/misc.c +++ b/src/misc.c @@ -578,7 +578,6 @@ static struct * utility function to convert index to bit value * */ -// cppcheck-suppress * uint64_t rig_idx2setting(int i) { return ((uint64_t)1) << i; diff --git a/tests/ampctl.c b/tests/ampctl.c index 1e7e9381..cbd8da64 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -49,7 +49,7 @@ extern char *readline(); #else /* no readline */ #endif /* HAVE_LIBREADLINE */ - +#warn here1 #ifdef HAVE_READLINE_HISTORY # include <sys/stat.h> # define HST_SHRT_OPTS "iI" diff --git a/tests/ampctld.c b/tests/ampctld.c index 440c2ce1..05f10ef2 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -599,7 +599,6 @@ int main(int argc, char *argv[]) #endif } - // cppcheck-suppress * while (retcode == 0); amp_close(my_amp); /* close port */ diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index ef931405..95f5064a 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -298,7 +298,6 @@ int hash_model_id_sort(struct mod_lst *a, struct mod_lst *b) void hash_sort_by_model_id() { - // cppcheck-suppress * HASH_SORT(models, hash_model_id_sort); } diff --git a/tests/rotctld.c b/tests/rotctld.c index c7bfa5e4..ab4e4d52 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -612,7 +612,6 @@ int main(int argc, char *argv[]) #endif } - // cppcheck-suppress * while (retcode == 0); rot_close(my_rot); /* close port */ diff --git a/tests/sprintflst.c b/tests/sprintflst.c index d7e456f4..567805c7 100644 --- a/tests/sprintflst.c +++ b/tests/sprintflst.c @@ -70,7 +70,6 @@ int sprintf_vfo(char *str, vfo_t vfo) int sprintf_mode(char *str, rmode_t mode) { - // cppcheck-suppress * uint64_t i, len = 0; *str = '\0'; @@ -82,7 +81,6 @@ int sprintf_mode(char *str, rmode_t mode) for (i = 0; i < 63; i++) { - // cppcheck-suppress * const char *ms = rig_strrmode(mode & (1ULL << i)); if (!ms || !ms[0]) @@ -148,7 +146,6 @@ int sprintf_ant(char *str, ant_t ant) int sprintf_func(char *str, setting_t func) { - // cppcheck-suppress * uint64_t i, len = 0; *str = '\0'; diff --git a/tests/testfreq.c b/tests/testfreq.c index b4632d1f..90ed5a4e 100644 --- a/tests/testfreq.c +++ b/tests/testfreq.c @@ -43,27 +43,22 @@ int main(int argc, char *argv[]) /* freq on 32bits test */ f = GHz(4); - // cppcheck-suppress * printf("GHz(4) = %"PRIll"\n", (int64_t)f); /* freq on >32bits test */ f = GHz(5); - // cppcheck-suppress * printf("GHz(5) = %"PRIll"\n", (int64_t)f); /* floating point to freq conversion test */ f = GHz(1.3); - // cppcheck-suppress * printf("GHz(1.3) = %"PRIll"\n", (int64_t)f); /* floating point to freq conversion precision test */ f = GHz(1.234567890); - // cppcheck-suppress * printf("GHz(1.234567890) = %"PRIll"\n", (int64_t)f); /* floating point to freq conversion precision test, with freq >32bits */ f = GHz(123.456789012); - // cppcheck-suppress * printf("GHz(123.456789012) = %"PRIll"\n", (int64_t)f); return 0; commit dd3b1b71d0e80598119f194686fedc460b2045fc Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Sep 2 16:44:46 2020 -0500 Fix spelling of Funkamateur diff --git a/rigs/kit/si570avrusb.c b/rigs/kit/si570avrusb.c index a971bf3b..57c416e1 100644 --- a/rigs/kit/si570avrusb.c +++ b/rigs/kit/si570avrusb.c @@ -476,7 +476,7 @@ const struct rig_caps fasdr_caps = { RIG_MODEL(RIG_MODEL_FASDR), .model_name = "FA-SDR", - .mfg_name = "Funkamatuer", + .mfg_name = "Funkamateur", .version = BACKEND_VER ".0", .copyright = "LGPL", .status = RIG_STATUS_ALPHA, ----------------------------------------------------------------------- Summary of changes: dummy/dummy.c | 1 - rigs/aor/aor.c | 1 - rigs/icom/frame.c | 11 ----------- rigs/icom/icom.c | 12 +++++++++--- rigs/jrc/jrc.c | 1 - rigs/kenwood/ts950.c | 4 ++-- rigs/kit/si570avrusb.c | 2 +- rigs/prm80/prm80.c | 2 -- rigs/tentec/tt550.c | 4 ---- rigs/yaesu/ft1000mp.c | 1 - rigs/yaesu/ft817.c | 3 --- rigs/yaesu/ft857.c | 3 --- rigs/yaesu/ft897.c | 3 --- src/microham.c | 1 - src/misc.c | 1 - tests/ampctl.c | 1 - tests/ampctld.c | 1 - tests/rotctl_parse.c | 1 - tests/rotctld.c | 1 - tests/sprintflst.c | 3 --- tests/testfreq.c | 5 ----- 21 files changed, 12 insertions(+), 50 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |