projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2334353
)
(decode_field_spec): Add an abort after
author
Jim Meyering
<jim@meyering.net>
Thu, 19 May 2005 10:34:46 +0000
(10:34 +0000)
committer
Jim Meyering
<jim@meyering.net>
Thu, 19 May 2005 10:34:46 +0000
(10:34 +0000)
`error (EXIT_FAILURE, ...' to avoid a gcc warning in caller,
about variables being used uninitialized.
src/join.c
patch
|
blob
|
history
diff --git
a/src/join.c
b/src/join.c
index a1c1f4adaccc3f3a39c439ccbb639902de6d4f48..8f4461206244909452947d9479d10aff14933c7f 100644
(file)
--- a/
src/join.c
+++ b/
src/join.c
@@
-664,6
+664,12
@@
decode_field_spec (const char *s, int *file_index, size_t *field_index)
default:
error (EXIT_FAILURE, 0,
_("invalid file number in field spec: %s"), quote (s));
+
+ /* Tell gcc -W -Wall that we can't get beyond this point.
+ This avoids a warning (otherwise legit) that the caller's copies
+ of *file_index and *field_index might be used uninitialized. */
+ abort ();
+
break;
}
}