Quell clang warning from optoscan.c

clang warned that lvl_len could be used unitialized in a call to
rig_debug.  Initialze lvl_len to 0 as its assignement is inside an if
conditional.

Also reported by Greg Troxel.
libusb-1-0
Nate Bargmann 2016-02-13 21:49:51 -06:00
rodzic c0a77e72a6
commit c26b893498
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -423,7 +423,7 @@ int optoscan_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
struct optostat status_block;
unsigned char lvlbuf[MAXFRAMELEN];
int lvl_len;
int lvl_len = 0;
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
int icom_val;
int cmdhead;