Avoid re-declaration of reboot. Silence some lint warnings.
This commit is contained in:
@@ -176,7 +176,7 @@ CFontzPacket_init (Driver *drvthis)
|
|||||||
{
|
{
|
||||||
struct termios portset;
|
struct termios portset;
|
||||||
int tmp, w, h;
|
int tmp, w, h;
|
||||||
int reboot = 0;
|
int cf_reboot = 0;
|
||||||
char size[200] = DEFAULT_SIZE;
|
char size[200] = DEFAULT_SIZE;
|
||||||
int default_speed = DEFAULT_SPEED;
|
int default_speed = DEFAULT_SPEED;
|
||||||
char *default_size = DEFAULT_SIZE;
|
char *default_size = DEFAULT_SIZE;
|
||||||
@@ -292,7 +292,7 @@ CFontzPacket_init (Driver *drvthis)
|
|||||||
p->newfirmware = drvthis->config_get_bool(drvthis->name, "NewFirmware", 0, 0);
|
p->newfirmware = drvthis->config_get_bool(drvthis->name, "NewFirmware", 0, 0);
|
||||||
|
|
||||||
/* Reboot display? */
|
/* Reboot display? */
|
||||||
reboot = drvthis->config_get_bool(drvthis->name, "Reboot", 0, 0);
|
cf_reboot = drvthis->config_get_bool(drvthis->name, "Reboot", 0, 0);
|
||||||
|
|
||||||
/* Am I USB or not? */
|
/* Am I USB or not? */
|
||||||
p->usb = drvthis->config_get_bool(drvthis->name, "USB", 0, 0);
|
p->usb = drvthis->config_get_bool(drvthis->name, "USB", 0, 0);
|
||||||
@@ -359,10 +359,10 @@ CFontzPacket_init (Driver *drvthis)
|
|||||||
memset(p->backingstore, ' ', p->width * p->height);
|
memset(p->backingstore, ' ', p->width * p->height);
|
||||||
|
|
||||||
/* Set display-specific stuff.. */
|
/* Set display-specific stuff.. */
|
||||||
if (reboot) {
|
if (cf_reboot) {
|
||||||
report(RPT_INFO, "%s: rebooting LCD...", drvthis->name);
|
report(RPT_INFO, "%s: rebooting LCD...", drvthis->name);
|
||||||
CFontzPacket_reboot(drvthis);
|
CFontzPacket_reboot(drvthis);
|
||||||
reboot = 0;
|
cf_reboot = 0;
|
||||||
debug(RPT_DEBUG, "%s: reboot done", __FUNCTION__);
|
debug(RPT_DEBUG, "%s: reboot done", __FUNCTION__);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -510,23 +510,23 @@ CFontzPacket_flush (Driver *drvthis)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = 0; i < p->height; i++) {
|
for (i = 0; i < p->height; i++) {
|
||||||
// set pointers to start of the line in frame buffer & backing store
|
|
||||||
unsigned char *sp = p->framebuf + (i * p->width);
|
|
||||||
unsigned char *sq = p->backingstore + (i * p->width);
|
|
||||||
|
|
||||||
debug(RPT_DEBUG, "Framebuf: '%.*s'", p->width, sp);
|
|
||||||
debug(RPT_DEBUG, "Backingstore: '%.*s'", p->width, sq);
|
|
||||||
|
|
||||||
/* Strategy:
|
/* Strategy:
|
||||||
* - not more than one update command per line
|
* - not more than one update command per line
|
||||||
* - leave out leading and trailing parts that are identical
|
* - leave out leading and trailing parts that are identical
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// set pointers to start of the line in frame buffer & backing store
|
||||||
|
unsigned char *sp = p->framebuf + (i * p->width);
|
||||||
|
unsigned char *sq = p->backingstore + (i * p->width);
|
||||||
|
|
||||||
// set pointers to end of the line in frame buffer & backing store
|
// set pointers to end of the line in frame buffer & backing store
|
||||||
unsigned char *ep = sp + (p->width - 1);
|
unsigned char *ep = sp + (p->width - 1);
|
||||||
unsigned char *eq = sq + (p->width - 1);
|
unsigned char *eq = sq + (p->width - 1);
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
|
||||||
|
debug(RPT_DEBUG, "Framebuf: '%.*s'", p->width, sp);
|
||||||
|
debug(RPT_DEBUG, "Backingstore: '%.*s'", p->width, sq);
|
||||||
|
|
||||||
// skip over leading identical portions of the line
|
// skip over leading identical portions of the line
|
||||||
for (j = 0; (sp <= ep) && (*sp == *sq); sp++, sq++, j++)
|
for (j = 0; (sp <= ep) && (*sp == *sq); sp++, sq++, j++)
|
||||||
;
|
;
|
||||||
@@ -624,6 +624,7 @@ CFontzPacket_get_key (Driver *drvthis)
|
|||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* NOTREACHED */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user