mirror of
https://github.com/Hamlib/Hamlib
synced 2026-08-13 17:32:05 -04:00
Quell gcc 8.2.0 warning of possible truncation
On Debian Buster gcc ((Debian 8.2.0-8) 8.2.0) was throwing the following
warning:
CC ft991.lo
../../hamlib/yaesu/ft991.c: In function ‘ft991_set_split_mode’:
../../hamlib/yaesu/ft991.c:336:5: warning: ‘strncat’ output may be truncated copying 128 bytes from a string of length 128 [-Wstringop-truncation]
strncat (restore_commands, priv->ret_data, NEWCAT_DATA_LEN-1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At least now the warning is gone...
This commit is contained in:
parent
a3ea2864a7
commit
2d7d3d21df
1 changed files with 2 additions and 2 deletions
|
|
@ -289,7 +289,7 @@ int ft991_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_wi
|
|||
* ------------------------------------------------------------------
|
||||
* Returns RIG_OK on success or an error code on failure
|
||||
*
|
||||
* Comments: Passs band is not set here nor does it make sense as the
|
||||
* Comments: Pass band is not set here nor does it make sense as the
|
||||
* FT991 cannot receive on VFO B. The FT991 cannot set
|
||||
* VFO B mode directly so we'll just set A and swap A
|
||||
* into B but we must preserve the VFO A mode and VFO B
|
||||
|
|
@ -333,7 +333,7 @@ int ft991_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_widt
|
|||
{
|
||||
return err;
|
||||
}
|
||||
strncat (restore_commands, priv->ret_data, NEWCAT_DATA_LEN-1);
|
||||
strncpy(restore_commands, priv->ret_data, NEWCAT_DATA_LEN);
|
||||
|
||||
/* Change mode on VFOA */
|
||||
if (RIG_OK != (err = newcat_set_mode (rig, RIG_VFO_A, tx_mode, RIG_PASSBAND_NOCHANGE)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue