es519xx.c: Fix a few compiler warnings (clang).

CC       libsigrok_hw_common_dmm_la-es519xx.lo
es519xx.c:632:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
es519xx.c:659:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
es519xx.c:688:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
es519xx.c:717:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
es519xx.c:746:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
es519xx.c:773:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
es519xx.c:800:33: warning: missing field 'is_voltage' initializer
      [-Wmissing-field-initializers]
        struct es519xx_info info = { 0 };
                                       ^
7 warnings generated.
This commit is contained in:
Uwe Hermann 2013-12-31 19:20:51 +01:00
parent 79a1176b3f
commit 35b904a792
1 changed files with 14 additions and 7 deletions

View File

@ -629,8 +629,9 @@ static int sr_es519xx_parse(const uint8_t *buf, float *floatval,
*/
SR_PRIV gboolean sr_es519xx_2400_11b_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 2400;
info.packet_size = 11;
@ -656,8 +657,9 @@ SR_PRIV int sr_es519xx_2400_11b_parse(const uint8_t *buf, float *floatval,
*/
SR_PRIV gboolean sr_es519xx_2400_11b_altfn_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 2400;
info.packet_size = 11;
info.alt_functions = TRUE;
@ -685,8 +687,9 @@ SR_PRIV int sr_es519xx_2400_11b_altfn_parse(const uint8_t *buf,
*/
SR_PRIV gboolean sr_es519xx_19200_11b_5digits_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 19200;
info.packet_size = 11;
info.fivedigits = TRUE;
@ -714,8 +717,9 @@ SR_PRIV int sr_es519xx_19200_11b_5digits_parse(const uint8_t *buf,
*/
SR_PRIV gboolean sr_es519xx_19200_11b_clamp_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 19200;
info.packet_size = 11;
info.clampmeter = TRUE;
@ -743,8 +747,9 @@ SR_PRIV int sr_es519xx_19200_11b_clamp_parse(const uint8_t *buf,
*/
SR_PRIV gboolean sr_es519xx_19200_11b_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 19200;
info.packet_size = 11;
@ -770,8 +775,9 @@ SR_PRIV int sr_es519xx_19200_11b_parse(const uint8_t *buf, float *floatval,
*/
SR_PRIV gboolean sr_es519xx_19200_14b_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 19200;
info.packet_size = 14;
@ -797,8 +803,9 @@ SR_PRIV int sr_es519xx_19200_14b_parse(const uint8_t *buf, float *floatval,
*/
SR_PRIV gboolean sr_es519xx_19200_14b_sel_lpf_packet_valid(const uint8_t *buf)
{
struct es519xx_info info = { 0 };
struct es519xx_info info;
memset(&info, 0, sizeof(struct es519xx_info));
info.baudrate = 19200;
info.packet_size = 14;
info.selectable_lpf = TRUE;