From ba3245b2350c424ced782193797186e3167d6f30 Mon Sep 17 00:00:00 2001 From: borutr Date: Fri, 28 Dec 2007 19:32:00 +0000 Subject: [PATCH] removed gcc warning: 'c' may be used uninitialized in this function git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4984 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- as/asxxsrc/aslex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/as/asxxsrc/aslex.c b/as/asxxsrc/aslex.c index ecf37f90..22fa8f41 100644 --- a/as/asxxsrc/aslex.c +++ b/as/asxxsrc/aslex.c @@ -382,7 +382,7 @@ getmap(d) char * readlin(char *str, size_t n, FILE *infp) { - int c; + int c = ' '; /* initialize it to something for the caharacter eating step */ char *s; static char eof_f = 0; @@ -400,8 +400,6 @@ readlin(char *str, size_t n, FILE *infp) while (--n && (c = getc(infp)) != '\n' && c != EOF) *s++ = c; } - else - c = ' '; /* initialize it to something for the caharacter eating step */ /* chop CR */ if (s > str && *(s - 1) == '\r') -- 2.30.2