diff options
| author | bjh21 <bjh21@NetBSD.org> | 2002-03-09 13:22:52 +0000 |
|---|---|---|
| committer | bjh21 <bjh21@NetBSD.org> | 2002-03-09 13:22:52 +0000 |
| commit | dca4ae94d6ed60958ecd2fcf690e6caf3e2dcd36 (patch) | |
| tree | f5ed6b6f6e1f987b22abbcfe2a6f9167d1e5b301 /gnu/dist/gawk | |
| parent | d77463efdec8b970f01fc8ff01b5953d8c55195d (diff) | |
When checking that a potentially-unsigned enum is >= 0, assign it to an int
first. This is necessary to avoid warnings with -fshort-enums. Casting
to an int really should be enough, but turns out not to be.
This change will be documented in doc/HACKS.
Diffstat (limited to 'gnu/dist/gawk')
| -rw-r--r-- | gnu/dist/gawk/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/dist/gawk/eval.c b/gnu/dist/gawk/eval.c index aa2e88162f1..999dbac857b 100644 --- a/gnu/dist/gawk/eval.c +++ b/gnu/dist/gawk/eval.c @@ -247,8 +247,9 @@ nodetype2str(type) NODETYPE type; { static char buf[40]; + int tmp; - if (type >= Node_illegal && type <= Node_final) + if ((tmp = type) >= Node_illegal && type <= Node_final) return nodetypes[(int) type]; sprintf(buf, "unknown nodetype %d", (int) type); |
