diff --git a/clients/lcdproc/util.c b/clients/lcdproc/util.c index 4ee34fb..5e23bc8 100644 --- a/clients/lcdproc/util.c +++ b/clients/lcdproc/util.c @@ -42,7 +42,7 @@ sprintf_memory(char *dst, double value, double roundlimit) if ((roundlimit <= 0.0) || (roundlimit > 1.0)) roundlimit = 0.5; - while (units[offs] != NULL > 0) { + while (units[offs] != NULL) { if (value <= 1024 * roundlimit) break; offs++; diff --git a/server/drivers/CFontz633.c b/server/drivers/CFontz633.c index 28631ba..5c0d351 100644 --- a/server/drivers/CFontz633.c +++ b/server/drivers/CFontz633.c @@ -442,7 +442,7 @@ CFontz633_flush (Driver *drvthis) MODULE_EXPORT char * CFontz633_get_key (Driver *drvthis) { - PrivateData *p = drvthis->private_data; + // PrivateData *p = drvthis->private_data; unsigned char key; key = GetKeyFromKeyRing(&keyring); diff --git a/server/drivers/MtxOrb.c b/server/drivers/MtxOrb.c index d02738a..48d4297 100644 --- a/server/drivers/MtxOrb.c +++ b/server/drivers/MtxOrb.c @@ -469,7 +469,7 @@ MtxOrb_init (Driver *drvthis) /* Make sure the frame buffer is there... */ if (!p->framebuf) - p->framebuf = (unsigned char *) + p->framebuf = (char *) malloc (p->widthBYheight); memset (p->framebuf, ' ', p->widthBYheight); diff --git a/server/drivers/curses_drv.c b/server/drivers/curses_drv.c index 293a648..0dfa0c1 100644 --- a/server/drivers/curses_drv.c +++ b/server/drivers/curses_drv.c @@ -399,13 +399,12 @@ curses_drv_backlight (Driver *drvthis, int promille) MODULE_EXPORT void curses_drv_string (Driver *drvthis, int x, int y, char *string) { - //int i; unsigned char *p; ValidX(x); ValidY(y); - p = string; + p = (unsigned char *) string; // Convert NULLs and 0xFF in string to // valid printables... diff --git a/server/drivers/glk.c b/server/drivers/glk.c index 4633421..5e15c3c 100644 --- a/server/drivers/glk.c +++ b/server/drivers/glk.c @@ -50,7 +50,7 @@ static unsigned char * screen_contents = NULL ; static int fontselected = 0 ; static int gpo_count = 0 ; -static char *framebuf = NULL; +static unsigned char * framebuf = NULL; static int width = 0; static int height = 0; static int cellwidth = LCD_DEFAULT_CELLWIDTH; @@ -241,11 +241,11 @@ MODULE_EXPORT void glk_flush(Driver *drvthis) { // puts( "glk_flush( )" ); - char * p ; - char * q ; + unsigned char * p ; + unsigned char * q ; int x, y ; int xs ; - char * ps = NULL ; + unsigned char * ps = NULL ; debug(RPT_DEBUG, "flush()\n" ); diff --git a/server/drivers/lb216.c b/server/drivers/lb216.c index 85e7cb7..f0aeb2b 100644 --- a/server/drivers/lb216.c +++ b/server/drivers/lb216.c @@ -146,7 +146,7 @@ LB216_init(Driver * drvthis) tcsetattr(fd, TCSANOW, &portset); // Make sure the frame buffer is there... - framebuf = (unsigned char *) malloc (width * height); + framebuf = malloc (width * height); if (framebuf == NULL) { report(RPT_ERR, "lb216_init: unable to create framebuffer.\n"); return -1; diff --git a/server/drivers/text.c b/server/drivers/text.c index a54aef9..27a067f 100644 --- a/server/drivers/text.c +++ b/server/drivers/text.c @@ -78,7 +78,7 @@ text_init (Driver *drvthis) } // Allocate the framebuffer - framebuf = (unsigned char *) malloc (width * height); + framebuf = malloc (width * height); memset (framebuf, ' ', width * height); return 0; diff --git a/shared/snprintf.c b/shared/snprintf.c index 2fb4411..d771bc8 100644 --- a/shared/snprintf.c +++ b/shared/snprintf.c @@ -415,6 +415,8 @@ static char credits[] = "\n\ @(#)snprintf.c, v2.2: Mark Martinec, \n\ @(#)snprintf.c, v2.2: Copyright 1999, Mark Martinec. Frontier Artistic License applies.\n\ @(#)snprintf.c, v2.2: http://www.ijs.si/software/snprintf/\n"; +/* avoid not used warning */ +inline const char* get_credits_snprintf(const char* dummy) { return credits; } #if defined(NEED_ASPRINTF) int asprintf(char **ptr, const char *fmt, /*args*/ ...) {