kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warnings
rodzic
5697961818
commit
a3b1b055b3
|
@ -521,7 +521,7 @@ static int netrigctl_open(RIG *rig)
|
|||
|
||||
if (strncmp(buf, "done", 4) == 0) { return RIG_OK; }
|
||||
|
||||
if (sscanf(buf, "%[^=]=%[^\t\n]", setting, value) == 2)
|
||||
if (sscanf(buf, "%31[^=]=%255[^\t\n]", setting, value) == 2)
|
||||
{
|
||||
if (strcmp(setting, "vfo_ops") == 0)
|
||||
{
|
||||
|
|
|
@ -22,10 +22,15 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
// cppcheck-suppress *
|
||||
#include <stdio.h>
|
||||
// cppcheck-suppress *
|
||||
#include <stdlib.h>
|
||||
// cppcheck-suppress *
|
||||
#include <string.h> /* String function definitions */
|
||||
// cppcheck-suppress *
|
||||
#include <unistd.h> /* UNIX standard function definitions */
|
||||
// cppcheck-suppress *
|
||||
#include <math.h>
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
|
@ -5079,7 +5084,7 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
{
|
||||
priv->tx_vfo = RIG_VFO_SUB;
|
||||
}
|
||||
else if (!status && !priv->split_on) // turned off satmode
|
||||
else if (!priv->split_on) // turned off satmode
|
||||
{
|
||||
priv->tx_vfo = RIG_VFO_A;
|
||||
}
|
||||
|
@ -6041,9 +6046,9 @@ int icom_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
|
|||
if (priv_caps->antack_len == 0) // we need to find out the antack_len
|
||||
{
|
||||
ant_t tmp_ant, ant_tx, ant_rx;
|
||||
int ant = 0;
|
||||
int ant0 = 0;
|
||||
value_t tmp_option;
|
||||
retval = rig_get_ant(rig, vfo, ant, &tmp_option, &tmp_ant, &ant_tx, &ant_rx);
|
||||
retval = rig_get_ant(rig, vfo, ant0, &tmp_option, &tmp_ant, &ant_tx, &ant_rx);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
|
|
|
@ -27,10 +27,11 @@
|
|||
#include "tones.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
// cppcheck-suppress *
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#define BACKEND_VER "20200501"
|
||||
#define BACKEND_VER "20200505"
|
||||
|
||||
/*
|
||||
* defines used by comp_cal_str in rig.c
|
||||
|
|
|
@ -1437,7 +1437,6 @@ const char *tt588_get_info(RIG *rig)
|
|||
|
||||
cmd_len = sprintf(cmdbuf, "?V" EOM);
|
||||
memset(firmware, 0, sizeof(firmware));
|
||||
firmware_len = sizeof(firmware);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: firmware_len=%d\n", __func__, firmware_len);
|
||||
retval = tt588_transaction(rig, cmdbuf, cmd_len, firmware, &firmware_len);
|
||||
|
||||
|
|
|
@ -23,10 +23,15 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
// cppcheck-suppress *
|
||||
#include <stdio.h>
|
||||
// cppcheck-suppress *
|
||||
#include <stdlib.h>
|
||||
// cppcheck-suppress *
|
||||
#include <string.h> /* String function definitions */
|
||||
// cppcheck-suppress *
|
||||
#include <unistd.h> /* UNIX standard function definitions */
|
||||
// cppcheck-suppress *
|
||||
#include <math.h>
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
|
|
|
@ -24,10 +24,15 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
// cppcheck-suppress *
|
||||
#include <stdio.h>
|
||||
// cppcheck-suppress *
|
||||
#include <stdlib.h>
|
||||
// cppcheck-suppress *
|
||||
#include <string.h> /* String function definitions */
|
||||
// cppcheck-suppress *
|
||||
#include <unistd.h> /* UNIX standard function definitions */
|
||||
// cppcheck-suppress *
|
||||
#include <math.h>
|
||||
|
||||
#include "hamlib/rotator.h"
|
||||
|
|
|
@ -167,7 +167,6 @@ int main(int argc, char *argv[])
|
|||
struct addrinfo hints, *result, *saved_result;
|
||||
int sock_listen;
|
||||
int reuseaddr = 1;
|
||||
int sockopt;
|
||||
char host[NI_MAXHOST];
|
||||
char serv[NI_MAXSERV];
|
||||
|
||||
|
@ -404,12 +403,15 @@ int main(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
sockopt = SO_SYNCHRONOUS_NONALERT;
|
||||
setsockopt(INVALID_SOCKET,
|
||||
SOL_SOCKET,
|
||||
SO_OPENTYPE,
|
||||
(char *)&sockopt,
|
||||
sizeof(sockopt));
|
||||
{
|
||||
int sockopt = SO_SYNCHRONOUS_NONALERT;
|
||||
setsockopt(INVALID_SOCKET,
|
||||
SOL_SOCKET,
|
||||
SO_OPENTYPE,
|
||||
(char *)&sockopt,
|
||||
sizeof(sockopt));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -459,7 +461,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
/* allow IPv4 mapped to IPv6 clients, MS & BSD default this
|
||||
to 1 i.e. disallowed */
|
||||
sockopt = 0;
|
||||
int sockopt = 0;
|
||||
|
||||
if (setsockopt(sock_listen,
|
||||
IPPROTO_IPV6,
|
||||
|
|
|
@ -25,13 +25,20 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
// cppcheck-suppress *
|
||||
#include <stdio.h>
|
||||
// cppcheck-suppress *
|
||||
#include <stdlib.h>
|
||||
// cppcheck-suppress *
|
||||
#include <string.h>
|
||||
// cppcheck-suppress *
|
||||
#include <unistd.h>
|
||||
// cppcheck-suppress *
|
||||
#include <ctype.h>
|
||||
// cppcheck-suppress *
|
||||
#include <errno.h>
|
||||
|
||||
// cppcheck-suppress *
|
||||
#include <getopt.h>
|
||||
|
||||
#include <hamlib/rig.h>
|
||||
|
@ -754,7 +761,9 @@ int set_channel_data(RIG *rig,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j == CHANLSTSIZ) {
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
printf("Requested channel number %d, list number %d\n", n, j);
|
||||
|
||||
mem_caps = &rig->state.chan_list[j].mem_caps;
|
||||
|
|
Ładowanie…
Reference in New Issue