src/analog.c: In function ‘sr_analog_to_float’:
src/analog.c:194:9: warning: declaration of ‘offset’ shadows a previous local [-Wshadow]
float offset = analog->encoding->offset.p / (float)analog->encoding->offset.q;
^~~~~~
src/analog.c:177:8: note: shadowed declaration is here
float offset;
^~~~~~
SR_API int sr_analog_to_float(const struct sr_datafeed_analog *analog,
float *outbuf)
{
- float offset;
unsigned int b, i, count;
gboolean bigendian;
if (analog->encoding->scale.p != 1
|| analog->encoding->scale.q != 1)
outbuf[i] = (outbuf[i] * analog->encoding->scale.p) / analog->encoding->scale.q;
- offset = ((float)analog->encoding->offset.p / (float)analog->encoding->offset.q);
+ float offset = ((float)analog->encoding->offset.p / (float)analog->encoding->offset.q);
outbuf[i] += offset;
}
}