Fix some space-followed-by-tab sequences.

* NEWS: Change space-tab sequences to just spaces.
* build-aux/check-testfiles.sh (main): Likewise
* build-aux/src-sniff.py (checkers): Likewise.
* find/Makefile.am: Likewise.
* find/testsuite/find.posix/sv-bug-25359.exp: Likewise.
* import-gnulib.sh (check_merge_driver): Likewise.
* m4/withfts.m4 (FIND_WITH_FTS): Likewise.
* cfg.mk (false_positives): Explain why we can't enable the
sc_space_tab check (xargs .xo test files).

Signed-off-by: James Youngman <jay@gnu.org>
This commit is contained in:
James Youngman 2010-04-02 12:19:46 +01:00
parent be821d9d87
commit 6115892b33
9 changed files with 83 additions and 45 deletions

View File

@ -1,5 +1,40 @@
2010-04-02 James Youngman <jay@gnu.org>
Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
* doc/find.texi (Updating A Timestamp File): Work around a syntax
check designed to prevent the use of "test X -a Y".
* find/find.1: Likewise.
* find/ftsfind.c: We don't use anything from xalloc.h, so don't
#include it.
Eliminate some unused function result warnings.
* lib/unused-result.h: New file, defines function attribute macro
__attribute_warn_unused_result__.
* lib/Makefile.am (EXTRA_DIST): Add unused-result.h.
* find/ftsfind.c (find): Issue a diagnostic if fts_close fails,
change return type to bool and return false for this case. Add
__warn_unused_result__ attribute.
(process_all_startpoints): Likewise (except no need for second
diagnostic).
(main): If process_all_startpoints failed, don't do the cleanup
operations because we don't know what subdirectory we're in.
* find/util.c (fd_leak_check_is_enabled): Avoid implicit
pointer-to-int conversion.
* lib/buildcmd.c: #include <stdlib.h> for declaration of free.
Fix some space-followed-by-tab sequences.
* NEWS: Change space-tab sequences to just spaces.
* build-aux/check-testfiles.sh (main): Likewise
* build-aux/src-sniff.py (checkers): Likewise.
* find/Makefile.am: Likewise.
* find/testsuite/find.posix/sv-bug-25359.exp: Likewise.
* import-gnulib.sh (check_merge_driver): Likewise.
* m4/withfts.m4 (FIND_WITH_FTS): Likewise.
* cfg.mk (false_positives): Explain why we can't enable the
sc_space_tab check (xargs .xo test files).
* cfg.mk: Explain that we cannot enable the sc_texinfo_acronym
syntax check right now, since the perm.texi file uses
@acronym{GNU} but we try to keep that in sync. with coreutils.

42
NEWS
View File

@ -1,4 +1,4 @@
GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
* Major changes in release 4.5.7-git, YYYY-MM-DD
@ -29,7 +29,7 @@ patch #4848: Patch - Support for SELinux
#28824: Corrected error message for "-ctime x".
Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
-uid, -used, -atime, -mtime, -ctime.
-uid, -used, -atime, -mtime, -ctime.
#27975: Infinite loop for -exec [..] {} +.
@ -207,12 +207,12 @@ The default optimisation level for find is now -O2 instead of -O0,
meaning that a number of additional optimisations are performed by
default. Current optimisations at each level are:
0: Perform -name, -path, -iname, -ipath before other checks.
1: Expressions containing only cost-free tests are evaluated
0: Perform -name, -path, -iname, -ipath before other checks.
1: Expressions containing only cost-free tests are evaluated
before expressions which contain more costly tests.
2: Bring forward all tests that need to know the type of a file
2: Bring forward all tests that need to know the type of a file
but don't need to stat it.
3: All tests are ordered by their estimated cost.
3: All tests are ordered by their estimated cost.
Cost here is simply an estimate of how time consuming the I/O
operations needed to make a test are.
@ -724,13 +724,13 @@ files. One of the status times for a file being considered (denoted
X) is checked against a reference time (denoted Y) for the file whose
name id the argument. X and Y can be:
a Access time
B Birth time (st_birthtime, currently unsupported)
c Change time
m Modification time
t Valid only for the reference time; instead of comparison
against a file status time, the argument is a time string.
Not yet supported.
a Access time
B Birth time (st_birthtime, currently unsupported)
c Change time
m Modification time
t Valid only for the reference time; instead of comparison
against a file status time, the argument is a time string.
Not yet supported.
For example, -newermm is equivalent to -newer, and -neweram is true if
the file being considered was accessed more recently than the
@ -890,10 +890,10 @@ the output of "find --version" will include the word "FTS".
Currently two binaries for 'find' are built. The configure option
--without-fts can be used to select whether 'find' uses fts:
With fts Without fts
default configuration find oldfind
configure --with-fts find oldfind
configure --without-fts ftsfind find
With fts Without fts
default configuration find oldfind
configure --with-fts find oldfind
configure --without-fts ftsfind find
New tests, -readable, -writable, -executable. These check that a file
can be read, written or executed respectively.
@ -1240,9 +1240,9 @@ New Vietnamese message translation.
* Major changes in release 4.2.17, 2005-02-08
** Bug Fixes
*** bug #11861 undefined symbol "basename" on IRIX 5.3
*** bug #11865 xargs -i regression (as compared to findutils-4.2.12)
*** bug #11866 Typo in pred_okdir renders it useless (affecting 4.2.16 only)
*** bug #11861 undefined symbol "basename" on IRIX 5.3
*** bug #11865 xargs -i regression (as compared to findutils-4.2.12)
*** bug #11866 Typo in pred_okdir renders it useless (affecting 4.2.16 only)
*** patch #3723 fix recent process_top_path change (for -execdir on /)
*** Fixing bug #11866 and applying patch #3723 made -execdir work much better.
*** find bar/baz/ugh now works again if baz is a symbolic link (broken
@ -1313,7 +1313,7 @@ New Vietnamese message translation.
*** Implemented the -samefile option.
** Documentation improvements
*** New chapter in the manual, "Security Considerations".
*** Better documentation for -prune (Mainly thanks to Stepan Kasal)
*** Better documentation for -prune (Mainly thanks to Stepan Kasal)
** Bug Fixes
*** locate's options -i and -w now work with the -e option (previously a bug
prevented this).

View File

@ -32,15 +32,15 @@ diagnose () {
check_shipfiles () {
distcount=`ls ${distdir}/*/testsuite/*/*${suffix} | wc -l`
srccount=`ls ${srcdir}/*/testsuite/*/*${suffix} | wc -l`
if test $distcount -eq $srccount ; then
echo "All $srccount of the $suffix files are accounted for"
else
echo "ERROR: Missing $suffix files: source $srccount distributed $distcount" >&2
rv=1
diagnose "${suffix}"
fi
distcount=`ls ${distdir}/*/testsuite/*/*${suffix} | wc -l`
srccount=`ls ${srcdir}/*/testsuite/*/*${suffix} | wc -l`
if test $distcount -eq $srccount ; then
echo "All $srccount of the $suffix files are accounted for"
else
echo "ERROR: Missing $suffix files: source $srccount distributed $distcount" >&2
rv=1
diagnose "${suffix}"
fi
}
@ -50,12 +50,12 @@ main () {
shift 2
if test "$#" -gt 0 ; then
for suffix ; do
check_shipfiles "$suffix"
check_shipfiles "$suffix"
done
exit $rv
exit $rv
else
echo "You did not specify any test file suffixes." >&2
exit 1
echo "You did not specify any test file suffixes." >&2
exit 1
fi
}

View File

@ -131,7 +131,7 @@ checkers = [
# Bourne shell code smells
RegexChecker('\.sh$',
[
['for\s*\w+\s*in.*;\s*do',
['for\s*\w+\s*in.*;\s*do',
# Solaris 10 /bin/sh rejects this, see Autoconf manual
"for loops should not contain a 'do' on the same line."],
], []),

7
cfg.mk
View File

@ -26,11 +26,14 @@ skip_dunno = sc_immutable_NEWS sc_makefile_at_at_check \
skip_defer = sc_program_name sc_prohibit_atoi_atof \
sc_prohibit_magic_number_exit sc_prohibit_stat_st_blocks \
sc_prohibit_strcmp sc_prohibit_test_minus_ao \
sc_prohibit_xalloc_without_use sc_space_tab \
sc_prohibit_xalloc_without_use
# False positives I don't have a workaround for yet.
# sc_space_tab: several .xo test output files contain this sequence
# for testing xargs's handling of white space.
false_positives = sc_obsolete_symbols sc_prohibit_cvs_keyword sc_the_the \
sc_two_space_separator_in_usage
sc_two_space_separator_in_usage \
sc_space_tab
# Problems that have some false positives and some real ones; tease
# apart later.

View File

@ -11,8 +11,8 @@ libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c share
# We always build two versions of find, one with fts, one without.
# Their names depend on whether the user specified --with-fts.
#
# --with-fts find extra binary
# yes with fts 'oldfind', without fts
# --with-fts find extra binary
# yes with fts 'oldfind', without fts
# no without fts 'ftsfind', with fts
#
if WITH_FTS

View File

@ -1,6 +1,6 @@
# Test for Savannah bug 25359
# (ftsfind -H thinks that non-argument symlinks are files)
# Affecting findutils
# Affecting findutils
# from acb82fe44369c108b43ec3e805aa94bf28352d0a
# to 0b1acd3358466b02f32baf9423665113dc933492
exec rm -rf tmp

View File

@ -276,8 +276,8 @@ Example:
label="Warning"
fi
if git config --get merge.merge-changelog.name >/dev/null ; then
driver="$(git config --get merge.merge-changelog.driver |
sed -e 's/[ ].*//')"
driver="$(git config --get merge.merge-changelog.driver |
sed -e 's/[ ].*//')"
if [[ $? -eq 0 ]]; then
if ! [[ -x "$driver" ]]; then
echo "ERROR: Merge driver $driver is not executable." >&2

View File

@ -2,9 +2,9 @@ AC_DEFUN([FIND_WITH_FTS],
[AC_ARG_WITH([fts],
[ --without-fts Use an older mechanism for searching the filesystem, instead of using fts()],[with_fts=$withval],[])
case $with_fts in
yes|no) ;;
'') with_fts=yes ;;
*) AC_MSG_ERROR([Invalid value for --with-fts: $with_fts])
yes|no) ;;
'') with_fts=yes ;;
*) AC_MSG_ERROR([Invalid value for --with-fts: $with_fts])
esac
AM_CONDITIONAL(WITH_FTS, [[test x"${with_fts-no}" != xno]])
if test x"${with_fts-no}" != xno ; then