diff options
author | Jim Meyering <jim@meyering.net> | 2005-05-19 10:34:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-05-19 10:34:46 +0000 |
commit | 1dacfee21a7c524f31acee9ea4dea4862fa43b1b (patch) | |
tree | d381ca7fe060a8474abff78dc29b4ebd4b70c709 /src | |
parent | 233435361902011efe62849dca1365c08e0c00a1 (diff) | |
download | coreutils-1dacfee21a7c524f31acee9ea4dea4862fa43b1b.tar.xz |
(decode_field_spec): Add an abort after
`error (EXIT_FAILURE, ...' to avoid a gcc warning in caller,
about variables being used uninitialized.
Diffstat (limited to 'src')
-rw-r--r-- | src/join.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/join.c b/src/join.c index a1c1f4ada..8f4461206 100644 --- 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; } } |