From: Uwe Hermann Date: Thu, 13 Jan 2011 22:50:34 +0000 (+0100) Subject: Whitespace and consistency fixes. X-Git-Tag: libsigrok-0.1.0~441 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=17e1afcb81b8581091fcb660c2e61f05c75e00b5;p=libsigrok.git Whitespace and consistency fixes. Also, drop a #include. It's unused anyway, and breaks the build on MinGW/Windows as there is no poll.h there. --- diff --git a/datastore.c b/datastore.c index 75cd243b..9527ff00 100644 --- a/datastore.c +++ b/datastore.c @@ -65,7 +65,7 @@ void datastore_put(struct datastore *ds, void *data, unsigned int length, int capacity, size, num_chunks, chunk_bytes_free, chunk_offset; gpointer chunk; - /* QUICK HACK */ + /* Avoid compiler warnings. */ in_unitsize = in_unitsize; probelist = probelist; diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index dcf5e7c2..cb6aa95c 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -97,7 +97,7 @@ static void hw_stop_acquisition(int device_index, gpointer session_device_id); static int hw_init(char *deviceinfo) { - /* Avoid compiler warning. */ + /* Avoid compiler warnings. */ deviceinfo = deviceinfo; struct sigrok_device_instance *sdi; @@ -114,7 +114,7 @@ static int hw_init(char *deviceinfo) static int hw_opendev(int device_index) { - /* Avoid compiler warning. */ + /* Avoid compiler warnings. */ device_index = device_index; /* Nothing needed so far. */ @@ -123,7 +123,7 @@ static int hw_opendev(int device_index) static void hw_closedev(int device_index) { - /* Avoid compiler warning. */ + /* Avoid compiler warnings. */ device_index = device_index; /* Nothing needed so far. */ @@ -165,7 +165,7 @@ static void *hw_get_device_info(int device_index, int device_info_id) static int hw_get_status(int device_index) { - /* Avoid compiler warning. */ + /* Avoid compiler warnings. */ device_index = device_index; return 0; /* FIXME */ @@ -181,7 +181,7 @@ static int hw_set_configuration(int device_index, int capability, void *value) int ret; uint64_t *tmp_u64; - /* Avoid compiler warning. */ + /* Avoid compiler warnings. */ device_index = device_index; if (capability == HWCAP_SAMPLERATE) { @@ -337,7 +337,7 @@ static void hw_stop_acquisition(int device_index, gpointer session_device_id) { struct datafeed_packet packet; - /* QUICK HACK */ + /* Avoid compiler warnings. */ device_index = device_index; /* Send last packet. */ diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c index 403c2b58..3d69dc97 100644 --- a/hardware/openbench-logic-sniffer/ols.c +++ b/hardware/openbench-logic-sniffer/ols.c @@ -777,7 +777,7 @@ static void hw_stop_acquisition(int device_index, gpointer session_device_id) { struct datafeed_packet packet; - /* QUICK HACK */ + /* Avoid compiler warnings. */ device_index = device_index; packet.type = DF_END; diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index 92a43f93..ba50ee94 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -297,7 +297,7 @@ static int hw_init(char *deviceinfo) libusb_device **devlist; int err, devcnt, i; - /* QUICK HACK */ + /* Avoid compiler warnings. */ deviceinfo = deviceinfo; if (libusb_init(&usb_context) != 0) { @@ -525,7 +525,7 @@ static int receive_data(int fd, int revents, void *user_data) { struct timeval tv; - /* QUICK HACK */ + /* Avoid compiler warnings. */ fd = fd; revents = revents; user_data = user_data; @@ -728,7 +728,7 @@ static void hw_stop_acquisition(int device_index, gpointer session_device_id) { struct datafeed_packet packet; - /* QUICK HACK */ + /* Avoid compiler warnings. */ device_index = device_index; packet.type = DF_END; diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index e034dfcc..1c5f2cef 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -280,7 +280,7 @@ static int hw_init(char *deviceinfo) libusb_device **devlist; int err, devcnt, i; - /* QUICK HACK */ + /* Avoid compiler warnings. */ deviceinfo = deviceinfo; if (libusb_init(&usb_context) != 0) { diff --git a/hwplugin.c b/hwplugin.c index c248476b..bbecaef1 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -167,7 +167,7 @@ struct usb_device_instance *usb_device_instance_new(uint8_t bus, void usb_device_instance_free(struct usb_device_instance *usb) { - /* QUICK HACK */ + /* Avoid compiler warnings. */ usb = usb; /* Nothing to do for this device instance type. */ diff --git a/session.c b/session.c index 210b73ba..e7d3c700 100644 --- a/session.c +++ b/session.c @@ -31,12 +31,12 @@ struct session *session_load(const char *filename) { struct session *session; + /* Avoid compiler warnings. */ + filename = filename; + /* TODO: Implement. */ session = NULL; - /* QUICK HACK */ - filename = filename; - return session; }