From f6bfbcb521b8137fcfbae358d3cfc63822456d6b Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 30 Aug 2012 19:57:56 +0100 Subject: [PATCH] dthello: Resolve 5 compiler warnings. --- cde/programs/dthello/dthello.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cde/programs/dthello/dthello.c b/cde/programs/dthello/dthello.c index 455cbc2a..9c54e2ad 100644 --- a/cde/programs/dthello/dthello.c +++ b/cde/programs/dthello/dthello.c @@ -184,7 +184,7 @@ Usage(void) fprintf(stderr, (char *) GETMESSAGE (4, 4, "usage: %s [-display ] [-bground ] [-fground ]\n"), progName); - fprintf(stderr, (char *) GETMESSAGE (4, 5, + fprintf(stderr, "%s", (char *) GETMESSAGE (4, 5, "\t[-font ] [-string ] [-timeout ] [-file ]\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'))) { -- 2.25.1