This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
File::Glob: silence some compiler warnings
authorDavid Mitchell <davem@iabyn.com>
Wed, 13 Nov 2013 12:33:40 +0000 (12:33 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Nov 2013 17:38:43 +0000 (17:38 +0000)
commit46a847d35219c7d246a7d6498769055e62afb5f3
tree26bcb8729dee115f402400aa18a0fa64f95df695
parentd07a6502d4984bc102004bf38b3a4a03cdcef346
File::Glob: silence some compiler warnings

In bsd_glob.c, there are nested set of functions glob0(), glob1() etc,
which among their parameters pass a pointer to a compiled pattern, and also
to its end. It turns out the end pointer isn't usually used, since the
pattern is usually scanned for BG_EOS instead. Also, glob3() is
passed two pattern ranges, both within the same pattern, and both with
the same pointer to the end of the pattern buffer. Since both end pointers
are the same, eliminate one of them. This removed an unused var compiler
warning. Use the remaining end pointer in the glob*() functions to add
assertions that we haven't fallen off the end of the buffer.

Finally, ARG_MAX may be signed.
ext/File-Glob/bsd_glob.c