Silence some lint(1) warnings

This commit is contained in:
mmdolze
2009-05-14 05:59:36 +00:00
parent 779ede6761
commit 640fcc1f1f
7 changed files with 29 additions and 25 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ static void Disable_Cursor(int fd)
/* Hardware function */
static void Init_Port(fd)
static void Init_Port(int fd)
{
/* Posix - set baudrate to 0 and back */
struct termios tty, old;
+4 -3
View File
@@ -71,8 +71,7 @@ MODULE_EXPORT char *symbol_prefix = "EA65_";
MODULE_EXPORT int
EA65_init (Driver *drvthis)
{
debug(RPT_INFO, "EA65: init(%p)", drvthis);
struct termios portset;
/* device is fixed */
char device[] = "/dev/ttyS1";
/*speed is fixed at 9600*/
@@ -80,6 +79,9 @@ EA65_init (Driver *drvthis)
/* Allocate and store private data */
PrivateData *p;
debug(RPT_INFO, "EA65: init(%p)", drvthis);
p = (PrivateData *) malloc(sizeof(PrivateData));
if (p == NULL)
return -1;
@@ -129,7 +131,6 @@ EA65_init (Driver *drvthis)
// Set up io port correctly, and open it...
debug( RPT_DEBUG, "EA65: Opening serial device: %s", device);
struct termios portset;
p->fd = open (device, O_RDWR | O_NOCTTY | O_NDELAY);
if (p->fd == -1) {
report (RPT_ERR, "EA65_init: failed (%s)", strerror (errno));
+4 -3
View File
@@ -68,7 +68,7 @@ typedef enum {
} CGmode;
/* PrivateData struct */
typedef struct pd {
typedef struct picolcd_private_data {
usb_dev_handle *lcd;
int width;
int height;
@@ -499,7 +499,7 @@ MODULE_EXPORT void picoLCD_set_char (Driver *drvthis, int n, unsigned char *dat)
{
PrivateData *p = drvthis->private_data;
return (p->device->cchar(drvthis, n, dat));
p->device->cchar(drvthis, n, dat);
}
@@ -689,6 +689,7 @@ MODULE_EXPORT char *picoLCD_get_key(Driver *drvthis)
int keys_read = 0;
int key_pass = 0;
int two_keys = 0;
int ret;
debug(RPT_DEBUG, "%s: get_key start (timeout %d)",
drvthis->name, p->key_timeout);
@@ -746,7 +747,7 @@ MODULE_EXPORT char *picoLCD_get_key(Driver *drvthis)
else {
debug(RPT_NOTICE, "%s: sending packet to lirc, length=%d",
drvthis->name, cbres);
int ret = sendto(p->lircsock, p->result, cbres, 0,
ret = sendto(p->lircsock, p->result, cbres, 0,
(struct sockaddr *) &(p->lircserver), sizeof(p->lircserver));
if (ret == -1) {
report(RPT_ERR, "%s: error sending UDP packet, errno=%d",
+15 -15
View File
@@ -404,7 +404,7 @@ pyramid_init (Driver *drvthis)
report(RPT_DEBUG, "%s: init() done", drvthis->name);
return 0;
};
}
/**
@@ -417,7 +417,7 @@ pyramid_close (Driver *drvthis)
PrivateData *p = (PrivateData *) drvthis->private_data;
close(p->FD);
};
}
/**
@@ -431,7 +431,7 @@ pyramid_width (Driver *drvthis)
PrivateData *p = (PrivateData *) drvthis->private_data;
return p->width;
};
}
/**
@@ -445,7 +445,7 @@ pyramid_height (Driver *drvthis)
PrivateData *p = (PrivateData *) drvthis->private_data;
return p->height;
};
}
/**
@@ -459,7 +459,7 @@ pyramid_clear (Driver *drvthis)
p->FB_modified=1;
strcpy(p->framebuffer, "D ");
};
}
/**
@@ -529,7 +529,7 @@ pyramid_string (Driver *drvthis, int x, int y, const char string[])
offset = (x)+p->width*(y-1);
len = min(strlen(string), p->width*p->height-offset+1);
memcpy(&p->framebuffer[offset], string, len);
};
}
/**
@@ -549,7 +549,7 @@ pyramid_chr (Driver *drvthis, int x, int y, char c)
x = min(p->width, x);
y = min(p->height, y);
p->framebuffer[x+p->width*(y-1)]=c;
};
}
/* User defined characters */
@@ -594,7 +594,7 @@ MODULE_EXPORT void pyramid_set_char (Driver *drvthis, int n, char *dat)
tele[row+2]=pixels;
}
real_send_tele(p, tele, 10);
};
}
/**
@@ -606,7 +606,7 @@ MODULE_EXPORT int pyramid_get_free_chars (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
return (p->customchars);
};
}
/**
@@ -618,7 +618,7 @@ MODULE_EXPORT int pyramid_cellwidth (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
return (p->cellwidth);
};
}
/**
@@ -630,7 +630,7 @@ MODULE_EXPORT int pyramid_cellheight (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
return (p->cellheight);
};
}
@@ -1112,7 +1112,7 @@ pyramid_cursor (Driver *drvthis, int x, int y, int state)
break;
}
p->C_state = state;
};
}
/* Hardware functions */
@@ -1153,7 +1153,7 @@ pyramid_output (Driver *drvthis, int state)
if(state & (1 << 8)) {
pyramid_init_custom1(drvthis);
}
};
}
/* Key functions */
@@ -1258,7 +1258,7 @@ pyramid_get_key (Driver *drvthis)
#endif
return NULL; // Ignore combined key events
};
}
/**
@@ -1272,6 +1272,6 @@ pyramid_get_info (Driver *drvthis)
static char *pyramid_info_string="Pyramid LCD driver";
return pyramid_info_string;
};
}
+3 -2
View File
@@ -97,6 +97,8 @@ static void send_packet(Driver *drvthis, char* packet)
MODULE_EXPORT int shuttleVFD_init(Driver *drvthis)
{
PrivateData *p;
struct usb_bus *bus;
int claim_rc;
// allocate and store private data
p = (PrivateData *)calloc(1, sizeof(PrivateData));
@@ -134,7 +136,6 @@ MODULE_EXPORT int shuttleVFD_init(Driver *drvthis)
usb_init();
usb_find_busses();
usb_find_devices();
struct usb_bus *bus;
for (bus = usb_get_busses(); bus != NULL; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev != NULL; dev = dev->next) {
@@ -149,7 +150,7 @@ MODULE_EXPORT int shuttleVFD_init(Driver *drvthis)
report(RPT_ERR, "%s: unable to find Shuttle VFD", drvthis->name);
return -1;
}
int claim_rc = usb_claim_interface(p->dev, SHUTTLE_VFD_INTERFACE_NUM);
claim_rc = usb_claim_interface(p->dev, SHUTTLE_VFD_INTERFACE_NUM);
if (claim_rc < 0) {
report(RPT_ERR,
"%s: unable to claim interface: %s",
+2
View File
@@ -1455,9 +1455,11 @@ MenuResult menuitem_process_input_ip(MenuItem *item, MenuToken token, const char
item->data.ip.edit_offs++;
}
}
/* FALLTHROUGH */
default:
return MENURESULT_NONE;
}
/* NOTREACHED */
return MENURESULT_ERROR;
}
-1
View File
@@ -433,7 +433,6 @@ sock_read_from_client(ClientSocketMap *clientSocketMap)
__FUNCTION__, clientSocketMap->socket, buffer);
return nbytes;
}
return nbytes;
}