From: borutr Date: Fri, 28 Dec 2007 19:32:00 +0000 (+0000) Subject: removed gcc warning: 'c' may be used uninitialized in this function X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ba3245b2350c424ced782193797186e3167d6f30;p=fw%2Fsdcc 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 --- 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')