Fix a few "variable set but not used" compiler warnings.
../src/hardware/appa-55ii/api.c: In function ‘scan’: ../src/hardware/appa-55ii/api.c:47:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/arachnid-labs-re-load-pro/api.c: In function ‘scan’: ../src/hardware/arachnid-labs-re-load-pro/api.c:62:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/atten-pps3xxx/api.c: In function ‘scan’: ../src/hardware/atten-pps3xxx/api.c:81:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/brymen-dmm/api.c: In function ‘scan’: ../src/hardware/brymen-dmm/api.c:89:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/cem-dt-885x/api.c: In function ‘scan’: ../src/hardware/cem-dt-885x/api.c:74:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/conrad-digi-35-cpu/api.c: In function ‘scan’: ../src/hardware/conrad-digi-35-cpu/api.c:45:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/demo/demo.c: In function ‘scan’: ../src/hardware/demo/demo.c:255:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/fluke-dmm/api.c: In function ‘fluke_scan’: ../src/hardware/fluke-dmm/api.c:64:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/gmc-mh-1x-2x/api.c: In function ‘scan_1x_2x_rs232’: ../src/hardware/gmc-mh-1x-2x/api.c:147:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/gmc-mh-1x-2x/api.c: In function ‘scan_2x_bd232’: ../src/hardware/gmc-mh-1x-2x/api.c:234:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/ikalogic-scanaplus/api.c: In function ‘scan’: ../src/hardware/ikalogic-scanaplus/api.c:69:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^ ../src/hardware/tondaj-sl-814/api.c: In function ‘scan’: ../src/hardware/tondaj-sl-814/api.c:44:22: warning: variable ‘drvc’ set but not used [-Wunused-but-set-variable] struct drv_context *drvc; ^
This commit is contained in:
parent
39fcfdc9da
commit
cd0de200b1
|
@ -44,7 +44,6 @@ static const char *data_sources[] = {
|
|||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
@ -80,7 +79,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
|
||||
sr_info("Probing serial port %s.", conn);
|
||||
|
||||
drvc = di->context;
|
||||
serial_flush(serial);
|
||||
|
||||
/* Let's get a bit of data and see if we can find a packet. */
|
||||
|
|
|
@ -59,7 +59,6 @@ static const uint32_t devopts_cg[] = {
|
|||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_config *src;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
|
@ -72,8 +71,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
char *bufptr;
|
||||
double version;
|
||||
|
||||
drvc = di->context;
|
||||
|
||||
conn = serialcomm = NULL;
|
||||
for (l = options; l; l = l->next) {
|
||||
src = l->data;
|
||||
|
|
|
@ -78,7 +78,6 @@ static const struct pps_model models[] = {
|
|||
static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_config *src;
|
||||
struct sr_channel *ch;
|
||||
|
@ -92,8 +91,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
|
|||
const char *conn, *serialcomm;
|
||||
char channel[10];
|
||||
|
||||
drvc = di->context;
|
||||
|
||||
conn = serialcomm = NULL;
|
||||
for (l = options; l; l = l->next) {
|
||||
src = l->data;
|
||||
|
|
|
@ -86,13 +86,11 @@ scan_cleanup:
|
|||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
struct sr_config *src;
|
||||
GSList *devices, *l;
|
||||
const char *conn, *serialcomm;
|
||||
|
||||
devices = NULL;
|
||||
drvc = di->context;
|
||||
|
||||
conn = serialcomm = NULL;
|
||||
for (l = options; l; l = l->next) {
|
||||
|
|
|
@ -71,7 +71,6 @@ static const char *data_sources[] = {
|
|||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_config *src;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
|
@ -96,7 +95,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
return NULL;
|
||||
|
||||
devices = NULL;
|
||||
drvc = di->context;
|
||||
start = g_get_monotonic_time();
|
||||
while (g_get_monotonic_time() - start < MAX_SCAN_TIME_US) {
|
||||
if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) {
|
||||
|
|
|
@ -42,13 +42,11 @@ static const uint32_t devopts[] = {
|
|||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct sr_config *src;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
GSList *l;
|
||||
const char *conn, *serialcomm;
|
||||
|
||||
drvc = di->context;
|
||||
conn = serialcomm = NULL;
|
||||
|
||||
for (l = options; l; l = l->next) {
|
||||
|
|
|
@ -252,7 +252,6 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
|
|||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
struct sr_channel *ch;
|
||||
|
@ -263,8 +262,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
int num_logic_channels, num_analog_channels, pattern, i;
|
||||
char channel_name[16];
|
||||
|
||||
drvc = di->context;
|
||||
|
||||
num_logic_channels = DEFAULT_NUM_LOGIC_CHANNELS;
|
||||
num_analog_channels = DEFAULT_NUM_ANALOG_CHANNELS;
|
||||
for (l = options; l; l = l->next) {
|
||||
|
|
|
@ -61,7 +61,6 @@ static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
|
|||
const char *serialcomm)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
GSList *devices;
|
||||
|
@ -73,7 +72,6 @@ static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
|
|||
if (serial_open(serial, SERIAL_RDWR) != SR_OK)
|
||||
return NULL;
|
||||
|
||||
drvc = di->context;
|
||||
b = buf;
|
||||
retry = 0;
|
||||
devices = NULL;
|
||||
|
|
|
@ -144,7 +144,6 @@ static enum model scan_model_sm(struct sr_serial_dev_inst *serial)
|
|||
static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_config *src;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
|
@ -154,7 +153,6 @@ static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options)
|
|||
gboolean serialcomm_given;
|
||||
|
||||
devices = NULL;
|
||||
drvc = di->context;
|
||||
conn = serialcomm = NULL;
|
||||
serialcomm_given = FALSE;
|
||||
|
||||
|
@ -231,7 +229,6 @@ static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options)
|
|||
static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_config *src;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
|
@ -245,8 +242,6 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
|
|||
conn = serialcomm = NULL;
|
||||
devices = NULL;
|
||||
|
||||
drvc = di->context;
|
||||
|
||||
sr_spew("scan_2x_bd232() called!");
|
||||
|
||||
for (l = options; l; l = l->next) {
|
||||
|
|
|
@ -66,15 +66,12 @@ static int dev_clear(const struct sr_dev_driver *di)
|
|||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
(void)options;
|
||||
|
||||
drvc = di->context;
|
||||
|
||||
/* Allocate memory for our private device context. */
|
||||
devc = g_malloc0(sizeof(struct dev_context));
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ static const uint32_t devopts[] = {
|
|||
|
||||
static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
struct dev_context *devc;
|
||||
struct sr_dev_inst *sdi;
|
||||
struct sr_config *src;
|
||||
|
@ -49,8 +48,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
const char *conn, *serialcomm;
|
||||
struct sr_serial_dev_inst *serial;
|
||||
|
||||
drvc = di->context;
|
||||
|
||||
conn = serialcomm = NULL;
|
||||
for (l = options; l; l = l->next) {
|
||||
if (!(src = l->data)) {
|
||||
|
|
Loading…
Reference in New Issue