diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-15 11:12:10 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-15 11:12:10 -0800 |
commit | 591e62a56ba2ab90ad159ae89406b9790bd96a11 (patch) | |
tree | 56c95583ef8111e3ffef302268ec94527c50c217 | |
parent | 95c3038f4a7e03c28ec6b209ec111cb2e3444646 (diff) |
GetLine: resolve -Wmaybe-uninitialized warning
lex.c: In function ‘GetLine’:
lex.c:38:8: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized]
38 | if (c == '\n')
| ^
lex.c:29:16: note: ‘c’ was declared here
29 | int i = 0, c;
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -26,7 +26,7 @@ DviGetAndPut(DviWidget dw, int *cp) char * GetLine(DviWidget dw, char *Buffer, int Length) { - int i = 0, c; + int i = 0, c = 0; char *p = Buffer; Length--; /* Save room for final NULL */ |