dthello: Resolve 5 compiler warnings.
authorPeter Howkins <flibble@users.sourceforge.net>
Thu, 30 Aug 2012 18:57:56 +0000 (19:57 +0100)
committerPeter Howkins <flibble@users.sourceforge.net>
Thu, 30 Aug 2012 18:57:56 +0000 (19:57 +0100)
cde/programs/dthello/dthello.c

index 455cbc2aecdd2e4c9012f9db04de14ced97b4e73..9c54e2adbdcc525c5941561909e695698257fb88 100644 (file)
@@ -184,7 +184,7 @@ Usage(void)
       fprintf(stderr, (char *) GETMESSAGE (4, 4, 
 "usage: %s [-display <display>] [-bground <color>] [-fground <color>]\n"),
                  progName);
-      fprintf(stderr, (char *) GETMESSAGE (4, 5, 
+      fprintf(stderr, "%s", (char *) GETMESSAGE (4, 5, 
 "\t[-font <font>] [-string <message>] [-timeout <seconds>] [-file <name>]\n"));
 }
 
@@ -759,7 +759,7 @@ SkipWhitespace (unsigned char *pch)
 
     if (pch)
     {
-       while ((*pch != NULL) &&
+       while ((*pch != '\0') &&
               ((chlen = mblen ((char *)pch, MB_CUR_MAX)) == 1) &&
               ((*pch == '\t') || (*pch == ' ')))
        {
@@ -800,12 +800,12 @@ KillNewlines (unsigned char *pch)
 
     if (pch)
     {
-       while (*pch != NULL)
+       while (*pch != '\0')
        {
            if (((chlen = mblen ((char *)pch, MB_CUR_MAX)) == 1) &&
                (*pch == '\n'))
            {
-               *pch = NULL;
+               *pch = '\0';
                break;
            }
            pch += chlen;
@@ -927,7 +927,7 @@ SeparateTextLines (unsigned char *pchIn)
 
     for (i = 0; (i < numLines) && (pch1 < pchInEnd); i++)
     {
-       while ((*pch2 != NULL) &&
+       while ((*pch2 != '\0') &&
                !(((chlen = mblen ((char *)pch2, MB_CUR_MAX)) == 1) &&
                 (*pch2 == '\n')))
        {