eliminated compiler warnings

This commit is contained in:
boercher
2005-10-25 22:34:07 +00:00
parent 305c5856cd
commit bba4631370
8 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -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++;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -2
View File
@@ -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...
+4 -4
View File
@@ -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" );
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+2
View File
@@ -415,6 +415,8 @@ static char credits[] = "\n\
@(#)snprintf.c, v2.2: Mark Martinec, <mark.martinec@ijs.si>\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*/ ...) {