All drivers: Drop unneeded comments.
This commit is contained in:
parent
fa7730623a
commit
64d33dc28e
1
device.c
1
device.c
|
@ -268,7 +268,6 @@ SR_PRIV struct sr_usb_dev_inst *sr_usb_dev_inst_new(uint8_t bus,
|
||||||
/** @private */
|
/** @private */
|
||||||
SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb)
|
SR_PRIV void sr_usb_dev_inst_free(struct sr_usb_dev_inst *usb)
|
||||||
{
|
{
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)usb;
|
(void)usb;
|
||||||
|
|
||||||
/* Nothing to do for this device instance type. */
|
/* Nothing to do for this device instance type. */
|
||||||
|
|
|
@ -71,7 +71,6 @@ static int hw_init(const char *devinfo)
|
||||||
struct sr_dev_inst *sdi;
|
struct sr_dev_inst *sdi;
|
||||||
struct context *ctx;
|
struct context *ctx;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)devinfo;
|
(void)devinfo;
|
||||||
|
|
||||||
if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
|
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. */
|
/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
|
||||||
static int hw_dev_acquisition_stop(int dev_index, void *cb_data)
|
static int hw_dev_acquisition_stop(int dev_index, void *cb_data)
|
||||||
{
|
{
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)dev_index;
|
(void)dev_index;
|
||||||
(void)cb_data;
|
(void)cb_data;
|
||||||
|
|
||||||
|
|
|
@ -458,6 +458,7 @@ static GSList *hw_scan(GSList *options)
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
(void)options;
|
(void)options;
|
||||||
|
|
||||||
drvc = adi->priv;
|
drvc = adi->priv;
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
clear_instances();
|
clear_instances();
|
||||||
|
@ -1419,7 +1420,6 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
uint8_t modestatus;
|
uint8_t modestatus;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)cb_data;
|
(void)cb_data;
|
||||||
|
|
||||||
sr_source_remove(0);
|
sr_source_remove(0);
|
||||||
|
|
|
@ -170,6 +170,7 @@ static GSList *hw_scan(GSList *options)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
(void)options;
|
(void)options;
|
||||||
|
|
||||||
drvc = ddi->priv;
|
drvc = ddi->priv;
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
|
|
||||||
|
@ -204,7 +205,6 @@ static GSList *hw_dev_list(void)
|
||||||
|
|
||||||
static int hw_dev_open(struct sr_dev_inst *sdi)
|
static int hw_dev_open(struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
/* Nothing needed so far. */
|
/* 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)
|
static int hw_dev_close(struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
/* Nothing needed so far. */
|
/* Nothing needed so far. */
|
||||||
|
@ -231,7 +230,6 @@ static int hw_cleanup(void)
|
||||||
static int hw_info_get(int info_id, const void **data,
|
static int hw_info_get(int info_id, const void **data,
|
||||||
const struct sr_dev_inst *sdi)
|
const struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
switch (info_id) {
|
switch (info_id) {
|
||||||
|
@ -404,7 +402,6 @@ static int receive_data(int fd, int revents, void *cb_data)
|
||||||
unsigned char c[BUFSIZE];
|
unsigned char c[BUFSIZE];
|
||||||
gsize z;
|
gsize z;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)fd;
|
(void)fd;
|
||||||
(void)revents;
|
(void)revents;
|
||||||
|
|
||||||
|
@ -522,7 +519,6 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
{
|
{
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)cb_data;
|
(void)cb_data;
|
||||||
|
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
|
@ -36,6 +36,7 @@ static struct sr_datafeed_analog *handle_qm_v1(const struct sr_dev_inst *sdi,
|
||||||
gboolean is_oor;
|
gboolean is_oor;
|
||||||
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
if (strcmp(tokens[0], "QM"))
|
if (strcmp(tokens[0], "QM"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -158,6 +159,7 @@ static struct sr_datafeed_analog *handle_qm_v2(const struct sr_dev_inst *sdi,
|
||||||
char *eptr;
|
char *eptr;
|
||||||
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
fvalue = strtof(tokens[0], &eptr);
|
fvalue = strtof(tokens[0], &eptr);
|
||||||
if (fvalue == 0.0 && eptr == tokens[0]) {
|
if (fvalue == 0.0 && eptr == tokens[0]) {
|
||||||
sr_err("Invalid float.");
|
sr_err("Invalid float.");
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb.h>
|
||||||
|
|
||||||
#include "fx2lafw.h"
|
#include "fx2lafw.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "libsigrok.h"
|
#include "libsigrok.h"
|
||||||
|
|
|
@ -431,8 +431,8 @@ static GSList *hw_scan(GSList *options)
|
||||||
libusb_device **devlist;
|
libusb_device **devlist;
|
||||||
int devcnt, num_logic_probes, ret, i, j;
|
int devcnt, num_logic_probes, ret, i, j;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)options;
|
(void)options;
|
||||||
|
|
||||||
drvc = fdi->priv;
|
drvc = fdi->priv;
|
||||||
|
|
||||||
/* This scan always invalidates any previous scans. */
|
/* 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;
|
struct timeval tv;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)fd;
|
(void)fd;
|
||||||
(void)revents;
|
(void)revents;
|
||||||
(void)cb_data;
|
(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. */
|
/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
|
||||||
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)cb_data;
|
(void)cb_data;
|
||||||
|
|
||||||
abort_acquisition(sdi->priv);
|
abort_acquisition(sdi->priv);
|
||||||
|
|
|
@ -559,7 +559,6 @@ static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||||
{
|
{
|
||||||
struct sr_datafeed_packet packet;
|
struct sr_datafeed_packet packet;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
sr_dbg("Stopping acquisition.");
|
sr_dbg("Stopping acquisition.");
|
||||||
|
|
|
@ -403,7 +403,6 @@ static int mso_parse_serial(const char *iSerial, const char *iProduct,
|
||||||
|
|
||||||
static int hw_init(void)
|
static int hw_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Nothing to do. */
|
/* Nothing to do. */
|
||||||
|
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
|
@ -694,7 +693,6 @@ static int receive_data(int fd, int revents, void *cb_data)
|
||||||
double analog_out[1024];
|
double analog_out[1024];
|
||||||
size_t i, s;
|
size_t i, s;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)revents;
|
(void)revents;
|
||||||
|
|
||||||
s = serial_read(fd, in, sizeof(in));
|
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;
|
struct sr_datafeed_packet packet;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)dev_index;
|
(void)dev_index;
|
||||||
|
|
||||||
packet.type = SR_DF_END;
|
packet.type = SR_DF_END;
|
||||||
|
|
|
@ -334,6 +334,7 @@ static GSList *hw_scan(GSList *options)
|
||||||
int ret, devcnt, i, j;
|
int ret, devcnt, i, j;
|
||||||
|
|
||||||
(void)options;
|
(void)options;
|
||||||
|
|
||||||
drvc = zdi->priv;
|
drvc = zdi->priv;
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ struct context {
|
||||||
|
|
||||||
static int format_match(const char *filename)
|
static int format_match(const char *filename)
|
||||||
{
|
{
|
||||||
/* suppress compiler warning */
|
|
||||||
(void)filename;
|
(void)filename;
|
||||||
|
|
||||||
/* this module will handle anything you throw at it */
|
/* this module will handle anything you throw at it */
|
||||||
|
|
|
@ -186,6 +186,7 @@ static GString *receive(struct sr_output *o, const struct sr_dev_inst *sdi,
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
(void)sdi;
|
(void)sdi;
|
||||||
|
|
||||||
if (!o || !o->sdi)
|
if (!o || !o->sdi)
|
||||||
return NULL;
|
return NULL;
|
||||||
ctx = o->internal;
|
ctx = o->internal;
|
||||||
|
|
|
@ -29,7 +29,6 @@ static int data(struct sr_output *o, const uint8_t *data_in,
|
||||||
{
|
{
|
||||||
uint8_t *outbuf;
|
uint8_t *outbuf;
|
||||||
|
|
||||||
/* Prevent compiler warnings. */
|
|
||||||
(void)o;
|
(void)o;
|
||||||
|
|
||||||
if (!data_in) {
|
if (!data_in) {
|
||||||
|
|
|
@ -59,7 +59,6 @@ static int receive_data(int fd, int revents, void *cb_data)
|
||||||
void *buf;
|
void *buf;
|
||||||
int ret, got_data;
|
int ret, got_data;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
|
||||||
(void)fd;
|
(void)fd;
|
||||||
(void)revents;
|
(void)revents;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue