Fix numerous gcc v10 warnings

pull/224/head
Michael Black 2020-04-04 22:49:27 -05:00
rodzic 066ee398c9
commit 46cb356f11
12 zmienionych plików z 24 dodań i 24 usunięć

Wyświetl plik

@ -31,7 +31,7 @@
*/ */
/** /**
* \file amp.h * \file amplifier.h
* \brief Hamlib amplifier data structures. * \brief Hamlib amplifier data structures.
* *
* This file contains the data structures and declarations for the Hamlib * This file contains the data structures and declarations for the Hamlib

Wyświetl plik

@ -81,10 +81,10 @@
*/ */
/** /**
* \def AMP_MODEL_ELECRAFT1 * \def AMP_MODEL_ELECRAFT
* \brief A macro that returns the model number of the EasyComm 1 backend. * \brief A macro that returns the model number of the EasyComm 1 backend.
* *
* The Elecraft 1 backend can be used with amplifiers that support the * The Elecraft #1 backend can be used with amplifiers that support the
* KPA1500 protocol. * KPA1500 protocol.
*/ */
#define AMP_ELECRAFT 2 #define AMP_ELECRAFT 2

Wyświetl plik

@ -205,8 +205,8 @@
* GS23 protocol. * GS23 protocol.
*/ */
/** /**
* \def ROT_MODEL_AMSAT_LVB * \def ROT_MODEL_LVB
* \brief A macro that returns the model number of the AMSAT_LVB TRACKER backend. * \brief A macro that returns the model number of the LVB TRACKER backend.
* *
* The AMSAT LVB TRACKER backend can be used with rotators that support the * The AMSAT LVB TRACKER backend can be used with rotators that support the
* AMSAT LVB TRACKER GS232 based protocol. * AMSAT LVB TRACKER GS232 based protocol.

Wyświetl plik

@ -1433,7 +1433,7 @@ int tt588_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
const char *tt588_get_info(RIG *rig) const char *tt588_get_info(RIG *rig)
{ {
static char cmdbuf[16], firmware[64]; static char cmdbuf[16], firmware[64];
int cmd_len, firmware_len, retval; int cmd_len, firmware_len=sizeof(firmware), retval;
cmd_len = sprintf(cmdbuf, "?V" EOM); cmd_len = sprintf(cmdbuf, "?V" EOM);
memset(firmware, 0, sizeof(firmware)); memset(firmware, 0, sizeof(firmware));

Wyświetl plik

@ -909,7 +909,7 @@ int rx331_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
const char *rx331_get_info(RIG *rig) const char *rx331_get_info(RIG *rig)
{ {
static char buf[BUFSZ]; /* FIXME: reentrancy */ static char buf[BUFSZ]; /* FIXME: reentrancy */
int firmware_len, retval; int firmware_len = sizeof(buf), retval;
retval = rx331_transaction(rig, REPORT_FIRM, strlen(REPORT_FIRM), retval = rx331_transaction(rig, REPORT_FIRM, strlen(REPORT_FIRM),
buf, &firmware_len); buf, &firmware_len);

Wyświetl plik

@ -6337,7 +6337,7 @@ int newcat_set_cmd(RIG *rig)
correct - alternative is response is longer that the correct - alternative is response is longer that the
buffer */ buffer */
if (strncmp(verify_cmd, priv->ret_data, strlen(verify_cmd) - 1) if (strncmp(verify_cmd, priv->ret_data, strlen(verify_cmd) - 1)
|| !strchr(&cat_term, priv->ret_data[strlen(priv->ret_data) - 1])) || (cat_term != priv->ret_data[strlen(priv->ret_data) - 1]))
{ {
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected verify command response '%s'\n", rig_debug(RIG_DEBUG_ERR, "%s: Unexpected verify command response '%s'\n",
__func__, priv->ret_data); __func__, priv->ret_data);

Wyświetl plik

@ -68,7 +68,7 @@ DEFINE_INITAMP_BACKEND(dummy);
DEFINE_INITAMP_BACKEND(kpa1500); DEFINE_INITAMP_BACKEND(kpa1500);
/** /**
* \def AMP_BACKEND_LIST * \def amp_backend_list
* \brief Static list of amplifier models. * \brief Static list of amplifier models.
* *
* This is a NULL terminated list of available amplifier backends. Each entry * This is a NULL terminated list of available amplifier backends. Each entry

Wyświetl plik

@ -77,7 +77,7 @@
* \param port * \param port
* \return file descriptor * \return file descriptor
*/ */
int cm108_open(hamlib_port_t *p) int cm108_open(hamlib_port_t *port)
{ {
int fd; int fd;
#ifdef HAVE_LINUX_HIDRAW_H #ifdef HAVE_LINUX_HIDRAW_H
@ -86,19 +86,19 @@ int cm108_open(hamlib_port_t *p)
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (!p->pathname[0]) if (!port->pathname[0])
{ {
return -RIG_EINVAL; return -RIG_EINVAL;
} }
fd = open(p->pathname, O_RDWR); fd = open(port->pathname, O_RDWR);
if (fd < 0) if (fd < 0)
{ {
rig_debug(RIG_DEBUG_ERR, rig_debug(RIG_DEBUG_ERR,
"%s: opening device \"%s\": %s\n", "%s: opening device \"%s\": %s\n",
__func__, __func__,
p->pathname, port->pathname,
strerror(errno)); strerror(errno));
return -RIG_EIO; return -RIG_EIO;
} }
@ -138,7 +138,7 @@ int cm108_open(hamlib_port_t *p)
#endif #endif
p->fd = fd; port->fd = fd;
return fd; return fd;
} }
@ -147,11 +147,11 @@ int cm108_open(hamlib_port_t *p)
* \brief Close CM108 HID port * \brief Close CM108 HID port
* \param port * \param port
*/ */
int cm108_close(hamlib_port_t *p) int cm108_close(hamlib_port_t *port)
{ {
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return close(p->fd); return close(port->fd);
} }

Wyświetl plik

@ -134,7 +134,7 @@ int HAMLIB_API rig_need_debug(enum rig_debug_level_e debug_level)
} }
/** /**
* \param debug_time_stamp * \param flag
* \brief Enbable/disable time stamp on debug output * \brief Enbable/disable time stamp on debug output
*/ */
void HAMLIB_API rig_set_debug_time_stamp(int flag) void HAMLIB_API rig_set_debug_time_stamp(int flag)

Wyświetl plik

@ -1084,17 +1084,17 @@ int HAMLIB_API rig_cleanup(RIG *rig)
/** /**
* \brief timeout (secs) to stop rigctld when VFO is manually changed * \brief timeout (secs) to stop rigctld when VFO is manually changed
* \param rig The rig handle * \param rig The rig handle
* \param timeout_secs The timeout to set to * \param seconds The timeout to set to
* *
* timeout (secs) to stop rigctld when VFO is manually changed * timeout seconds to stop rigctld when VFO is manually changed
* turns on/off the radio. * turns on/off the radio.
* See \set_twiddle * See \rig_set_twiddle
* *
* \return RIG_OK if the operation has been sucessful, ortherwise * \return RIG_OK if the operation has been sucessful, ortherwise
* a negative value if an error occured (in which case, cause is * a negative value if an error occured (in which case, cause is
* set appropriately). * set appropriately).
* *
* \sa rig_set_twiddle() * \sa rig_get_twiddle()
*/ */
int HAMLIB_API rig_set_twiddle(RIG *rig, int seconds) int HAMLIB_API rig_set_twiddle(RIG *rig, int seconds)
{ {

Wyświetl plik

@ -85,7 +85,7 @@ DEFINE_INITROT_BACKEND(meade);
DEFINE_INITROT_BACKEND(ioptron); DEFINE_INITROT_BACKEND(ioptron);
/** /**
* \def ROT_BACKEND_LIST * \def rot_backend_list
* \brief Static list of rotator models. * \brief Static list of rotator models.
* *
* This is a NULL terminated list of available rotator backends. Each entry * This is a NULL terminated list of available rotator backends. Each entry

Wyświetl plik

@ -32,7 +32,7 @@
/** /**
* \brief provide sleep and usleep replacements * \brief provide sleep and usleep replacements
* \param same as man page for each * \note parameters are same as man page for each
* *
*/ */
#include <unistd.h> #include <unistd.h>
@ -99,7 +99,7 @@ int usleep(useconds_t usec)
return 0; return 0;
} }
#endif // HAVE_NANOSLEEP #endif // HAVE_NANOSLEEP
#pragma GCC diagnostic ignored "-Wall"
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif