teleinfo: Fix a compiler warning (clang).
CC libsigrok_hw_teleinfo_la-protocol.lo protocol.c:62:41: warning: missing field 'num_samples' initializer [-Wmissing-field-initializers] struct sr_datafeed_analog analog = { 0 }; ^
This commit is contained in:
parent
42f2f8a533
commit
162a48bfc7
|
@ -57,14 +57,18 @@ static struct sr_probe *teleinfo_find_probe(struct sr_dev_inst *sdi,
|
||||||
static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *probe_name,
|
static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *probe_name,
|
||||||
float value, int mq, int unit)
|
float value, int mq, int unit)
|
||||||
{
|
{
|
||||||
struct dev_context *devc = sdi->priv;
|
struct dev_context *devc;
|
||||||
struct sr_datafeed_packet packet;
|
struct sr_datafeed_packet packet;
|
||||||
struct sr_datafeed_analog analog = { 0 };
|
struct sr_datafeed_analog analog;
|
||||||
struct sr_probe *probe = teleinfo_find_probe(sdi, probe_name);
|
struct sr_probe *probe;
|
||||||
|
|
||||||
|
devc = sdi->priv;
|
||||||
|
probe = teleinfo_find_probe(sdi, probe_name);
|
||||||
|
|
||||||
if (!probe || !probe->enabled)
|
if (!probe || !probe->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
memset(&analog, 0, sizeof(struct sr_datafeed_analog));
|
||||||
analog.probes = g_slist_append(analog.probes, probe);
|
analog.probes = g_slist_append(analog.probes, probe);
|
||||||
analog.num_samples = 1;
|
analog.num_samples = 1;
|
||||||
analog.mq = mq;
|
analog.mq = mq;
|
||||||
|
|
Loading…
Reference in New Issue