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:
Uwe Hermann 2016-05-27 15:11:28 +02:00
parent 39fcfdc9da
commit cd0de200b1
11 changed files with 0 additions and 30 deletions

View File

@ -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. */

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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) {

View File

@ -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));

View File

@ -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)) {