Address some compiler warnings

7x unused variable, 1x assignment used as truth value, 1x pointer signedness

Signed-off-by: Dan Dennedy <dan@dennedy.org>
This commit is contained in:
Stefan Richter 2008-10-18 01:24:31 +02:00 committed by Dan Dennedy
parent 531b0787f1
commit d080bb3d83
5 changed files with 5 additions and 10 deletions

View File

@ -109,7 +109,6 @@ int ieee1394_arm_set_buf (struct ieee1394_handle *handle, nodeaddr_t start,
size_t length, void *buf) size_t length, void *buf)
{ {
struct raw1394_request req; struct raw1394_request req;
int status;
CLEAR_REQ(&req); CLEAR_REQ(&req);
@ -139,7 +138,6 @@ int ieee1394_arm_get_buf (struct ieee1394_handle *handle, nodeaddr_t start,
size_t length, void *buf) size_t length, void *buf)
{ {
struct raw1394_request req; struct raw1394_request req;
int status;
CLEAR_REQ(&req); CLEAR_REQ(&req);

View File

@ -71,7 +71,7 @@ void raw1394_destroy_handle(raw1394handle_t handle)
raw1394handle_t raw1394_new_handle_on_port(int port) raw1394handle_t raw1394_new_handle_on_port(int port)
{ {
ieee1394handle_t ieee1394_handle = ieee1394_new_handle_on_port(port); ieee1394handle_t ieee1394_handle = ieee1394_new_handle_on_port(port);
fw_handle_t fw_handle = NULL; fw_handle_t fw_handle;
raw1394handle_t handle = NULL; raw1394handle_t handle = NULL;
if (ieee1394_handle) { if (ieee1394_handle) {
@ -82,7 +82,7 @@ raw1394handle_t raw1394_new_handle_on_port(int port)
} else } else
ieee1394_destroy_handle(ieee1394_handle); ieee1394_destroy_handle(ieee1394_handle);
} }
else if (fw_handle = fw_new_handle_on_port(port)) { else if ((fw_handle = fw_new_handle_on_port(port))) {
handle = (raw1394handle_t) malloc(sizeof(struct raw1394_handle)); handle = (raw1394handle_t) malloc(sizeof(struct raw1394_handle));
if (handle) { if (handle) {
handle->is_fw = 1; handle->is_fw = 1;

View File

@ -32,7 +32,7 @@ int ieee1394_loop_iterate(struct raw1394_handle *handle)
{ {
struct raw1394_request req; struct raw1394_request req;
ieee1394handle_t ihandle = handle->mode.ieee1394; ieee1394handle_t ihandle = handle->mode.ieee1394;
int retval = 0, channel; int retval = 0;
while (read(ihandle->fd, &req, sizeof(req)) < 0) { while (read(ihandle->fd, &req, sizeof(req)) < 0) {
if (errno != EINTR) return -1; if (errno != EINTR) return -1;

View File

@ -85,7 +85,8 @@ queue_xmit_packets(raw1394handle_t handle, int limit)
fw_handle_t fwhandle = handle->mode.fw; fw_handle_t fwhandle = handle->mode.fw;
enum raw1394_iso_disposition d; enum raw1394_iso_disposition d;
unsigned char tag, sy; unsigned char tag, sy;
int len, cycle = -1; unsigned int len;
int cycle = -1;
unsigned int dropped = 0; unsigned int dropped = 0;
if (fwhandle->iso.xmit_handler == NULL) if (fwhandle->iso.xmit_handler == NULL)
@ -258,9 +259,7 @@ int fw_iso_xmit_write(raw1394handle_t handle, unsigned char *data,
unsigned char sy) unsigned char sy)
{ {
fw_handle_t fwhandle = handle->mode.fw; fw_handle_t fwhandle = handle->mode.fw;
struct fw_cdev_queue_iso queue_iso;
struct fw_cdev_start_iso start_iso; struct fw_cdev_start_iso start_iso;
struct fw_cdev_iso_packet *p;
int retval; int retval;
if (len > fwhandle->iso.max_packet_size) { if (len > fwhandle->iso.max_packet_size) {

View File

@ -253,9 +253,7 @@ void *raw1394_get_userdata(struct raw1394_handle *handle)
int ieee1394_get_port_info(struct ieee1394_handle *handle, int ieee1394_get_port_info(struct ieee1394_handle *handle,
struct raw1394_portinfo *pinf, int maxports) struct raw1394_portinfo *pinf, int maxports)
{ {
int num;
struct raw1394_request req; struct raw1394_request req;
struct raw1394_khost_list *khl;
CLEAR_REQ(&req); CLEAR_REQ(&req);
req.type = RAW1394_REQ_LIST_CARDS; req.type = RAW1394_REQ_LIST_CARDS;