uni-t-ut181a: silence compiler warning, use of uninitialized variable
The ut181a driver's acquisition start routine may face a previously
unknown data source value, which is potentially unhandled when the
source code becomes inconsistent during maintenance. Add a default
case to handle the condition, which silences a compiler warning.
src/hardware/uni-t-ut181a/api.c:505:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (devc->data_source >= DATA_SOURCE_REC_FIRST) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware/uni-t-ut181a/api.c:536:6: note: uninitialized use occurs here
if (ret < 0)
^~~
src/hardware/uni-t-ut181a/api.c:505:9: note: remove the 'if' if its condition is always true
} else if (devc->data_source >= DATA_SOURCE_REC_FIRST) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware/uni-t-ut181a/api.c:467:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0