diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 2bc74ad8a..897f6b47f 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1382,8 +1382,8 @@ typedef int (* confval_cb_t)(RIG *, * sharing the struct rig_caps of the backend, while keeping their own * customized data. * - * mdblack: Don't move fields around without bumping the version numbers - * DLL or shared library replacement would break the interface + * mdblack: Don't move or add fields around without bumping the version numbers + * DLL or shared library replacement depends on order */ #define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg struct rig_caps { @@ -1393,7 +1393,6 @@ struct rig_caps { const char *version; /*!< Driver version. */ const char *copyright; /*!< Copyright info. */ enum rig_status_e status; /*!< Driver status. */ - const char *macro_name; /*!< Rig model macro name */ int rig_type; /*!< Rig type. */ ptt_type_t ptt_type; /*!< Type of the PTT port. */ @@ -1645,6 +1644,7 @@ struct rig_caps { const char *clone_combo_set; /*!< String describing key combination to enter load cloning mode */ const char *clone_combo_get; /*!< String describing key combination to enter save cloning mode */ + const char *macro_name; /*!< Rig model macro name */ }; diff --git a/src/mem.c b/src/mem.c index 33fabe2b2..42b2849bf 100644 --- a/src/mem.c +++ b/src/mem.c @@ -363,9 +363,8 @@ static int generic_save_channel(RIG *rig, channel_t *chan) vfo_t vfo; setting_t setting; const channel_cap_t *mem_cap = NULL; - value_t vdummy; + value_t vdummy = {0}; - vdummy.i = 0; chan_num = chan->channel_num; vfo = chan->vfo; memset(chan, 0, sizeof(channel_t)); @@ -533,7 +532,7 @@ static int generic_restore_channel(RIG *rig, const channel_t *chan) struct ext_list *p; setting_t setting; const channel_cap_t *mem_cap = NULL; - value_t vdummy; + value_t vdummy = {0}; if (chan->vfo == RIG_VFO_MEM) {