All drivers: Drop unneeded comments.

This commit is contained in:
Uwe Hermann 2012-11-11 09:30:42 +01:00
parent fa7730623a
commit 64d33dc28e
14 changed files with 7 additions and 21 deletions

View File

@ -268,7 +268,6 @@ SR_PRIV struct sr_usb_dev_inst *sr_usb_dev_inst_new(uint8_t bus,
/** @private */
SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb)
{
/* Avoid compiler warnings. */
(void)usb;
/* Nothing to do for this device instance type. */

View File

@ -71,7 +71,6 @@ static int hw_init(const char *devinfo)
struct sr_dev_inst *sdi;
struct context *ctx;
/* Avoid compiler warnings. */
(void)devinfo;
if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
@ -389,7 +388,6 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data)
/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
static int hw_dev_acquisition_stop(int dev_index, void *cb_data)
{
/* Avoid compiler warnings. */
(void)dev_index;
(void)cb_data;

View File

@ -458,6 +458,7 @@ static GSList *hw_scan(GSList *options)
int ret, i;
(void)options;
drvc = adi->priv;
devices = NULL;
clear_instances();
@ -1419,7 +1420,6 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
struct dev_context *devc;
uint8_t modestatus;
/* Avoid compiler warnings. */
(void)cb_data;
sr_source_remove(0);

View File

@ -170,6 +170,7 @@ static GSList *hw_scan(GSList *options)
int i;
(void)options;
drvc = ddi->priv;
devices = NULL;
@ -204,7 +205,6 @@ static GSList *hw_dev_list(void)
static int hw_dev_open(struct sr_dev_inst *sdi)
{
/* Avoid compiler warnings. */
(void)sdi;
/* Nothing needed so far. */
@ -214,7 +214,6 @@ static int hw_dev_open(struct sr_dev_inst *sdi)
static int hw_dev_close(struct sr_dev_inst *sdi)
{
/* Avoid compiler warnings. */
(void)sdi;
/* Nothing needed so far. */
@ -231,7 +230,6 @@ static int hw_cleanup(void)
static int hw_info_get(int info_id, const void **data,
const struct sr_dev_inst *sdi)
{
(void)sdi;
switch (info_id) {
@ -404,7 +402,6 @@ static int receive_data(int fd, int revents, void *cb_data)
unsigned char c[BUFSIZE];
gsize z;
/* Avoid compiler warnings. */
(void)fd;
(void)revents;
@ -522,7 +519,6 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
struct dev_context *devc;
/* Avoid compiler warnings. */
(void)cb_data;
devc = sdi->priv;

View File

@ -36,6 +36,7 @@ static struct sr_datafeed_analog *handle_qm_v1(const struct sr_dev_inst *sdi,
gboolean is_oor;
(void)sdi;
if (strcmp(tokens[0], "QM"))
return NULL;
@ -158,6 +159,7 @@ static struct sr_datafeed_analog *handle_qm_v2(const struct sr_dev_inst *sdi,
char *eptr;
(void)sdi;
fvalue = strtof(tokens[0], &eptr);
if (fvalue == 0.0 && eptr == tokens[0]) {
sr_err("Invalid float.");

View File

@ -18,7 +18,6 @@
*/
#include <libusb.h>
#include "fx2lafw.h"
#include "command.h"
#include "libsigrok.h"

View File

@ -431,8 +431,8 @@ static GSList *hw_scan(GSList *options)
libusb_device **devlist;
int devcnt, num_logic_probes, ret, i, j;
/* Avoid compiler warnings. */
(void)options;
drvc = fdi->priv;
/* This scan always invalidates any previous scans. */
@ -686,7 +686,6 @@ static int receive_data(int fd, int revents, void *cb_data)
{
struct timeval tv;
/* Avoid compiler warnings. */
(void)fd;
(void)revents;
(void)cb_data;
@ -1028,8 +1027,6 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
/* Avoid compiler warnings. */
(void)cb_data;
abort_acquisition(sdi->priv);

View File

@ -559,7 +559,6 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
struct sr_datafeed_packet packet;
/* Avoid compiler warnings. */
(void)sdi;
sr_dbg("Stopping acquisition.");

View File

@ -403,7 +403,6 @@ static int mso_parse_serial(const char *iSerial, const char *iProduct,
static int hw_init(void)
{
/* Nothing to do. */
return SR_OK;
@ -694,7 +693,6 @@ static int receive_data(int fd, int revents, void *cb_data)
double analog_out[1024];
size_t i, s;
/* Avoid compiler warnings. */
(void)revents;
s = serial_read(fd, in, sizeof(in));
@ -830,7 +828,6 @@ static int hw_dev_acquisition_stop(int dev_index, void *cb_data)
{
struct sr_datafeed_packet packet;
/* Avoid compiler warnings. */
(void)dev_index;
packet.type = SR_DF_END;

View File

@ -334,6 +334,7 @@ static GSList *hw_scan(GSList *options)
int ret, devcnt, i, j;
(void)options;
drvc = zdi->priv;
devices = NULL;

View File

@ -35,7 +35,6 @@ struct context {
static int format_match(const char *filename)
{
/* suppress compiler warning */
(void)filename;
/* this module will handle anything you throw at it */

View File

@ -186,6 +186,7 @@ static GString *receive(struct sr_output *o, const struct sr_dev_inst *sdi,
int i, j;
(void)sdi;
if (!o || !o->sdi)
return NULL;
ctx = o->internal;

View File

@ -29,7 +29,6 @@ static int data(struct sr_output *o, const uint8_t *data_in,
{
uint8_t *outbuf;
/* Prevent compiler warnings. */
(void)o;
if (!data_in) {

View File

@ -59,7 +59,6 @@ static int receive_data(int fd, int revents, void *cb_data)
void *buf;
int ret, got_data;
/* Avoid compiler warnings. */
(void)fd;
(void)revents;