diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-10 21:53:13 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-10 21:53:13 +0200 |
commit | 0cf50ae4c064bd2d8960ffd1e14f97402b8f5157 (patch) | |
tree | 8c78e943bad2fd68bc7abf2d1d10bf193e37e941 | |
parent | 35d9ad9209592594905d1c8f15130d09af111411 (diff) | |
download | egawk-0cf50ae4c064bd2d8960ffd1e14f97402b8f5157.tar.gz egawk-0cf50ae4c064bd2d8960ffd1e14f97402b8f5157.tar.bz2 egawk-0cf50ae4c064bd2d8960ffd1e14f97402b8f5157.zip |
Remove some compile time warnings.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | builtin.c | 2 | ||||
-rw-r--r-- | eval.c | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2011-10-10 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c (do_sub): Init textlen to zero to avoid "may be + used unitialized" warning. Thanks to Corinna Vinschen for + pointing this out. + * eval.c (unwind_stack): Add parentheses around condition in while + to avoid overzealous warning from GCC. + 2011-09-30 Eli Zaretskii <eliz@gnu.org> * io.c (remap_std_file): Fix non-portable code that caused @@ -2422,7 +2422,7 @@ do_sub(int nargs, unsigned int flags) size_t len; char *matchstart; char *text; - size_t textlen; + size_t textlen = 0; char *repl; char *replend; size_t repllen; @@ -1418,7 +1418,7 @@ unwind_stack(long n) if (stack_ptr < sp) return NULL; - while (r = POP()) { + while ((r = POP()) != NULL) { switch (r->type) { case Node_frame: cp = restore_frame(r); |