1781 Commits

Author SHA1 Message Date
James Youngman
b7acaef07c Prepare to release findutils-4.5.8.
* configure.ac: Update version number in AC_INIT.
* NEWS: Update version number and release date.

Signed-off-by: James Youngman <jay@gnu.org>
v4.5.8
2010-04-07 23:48:37 +01:00
James Youngman
cf0b12478c Did 'make -C po update-po' 2010-04-07 23:45:08 +01:00
James Youngman
bf98503112 Depend on gnulib modules appropriate to features we already use.
* import-gnulib.config (modules): Add c-casestr, errno, fdopendir,
fflush, getdelim, gettimeofday, locale, modf, perror, snprintf,
stat, stdarg, stddef, stdio, stdlib, string, strpbrk, sys_time,
sys_wait.
Also add comments about other modules we may also want to use
which would require other code changes (for example dirent-safer).
* find/Makefile.am (LDADD): Add  $(LIB_EACCESS) $(LIB_SELINUX)
$(MODF_LIBM) which are needed by gnulib modules we now depend on.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 22:25:02 +01:00
James Youngman
419a017364 More stat/xstat cleanup.
* find/parser.c (estimate_fstype_success_rate): Change the name of
the variable "dir" to "the_root_dir" to emphasise that it doesn't
matter that we're calling stat rather than options.xstat.
* find/ftsfind.c (symlink_loop): Call options.xstat instead of
stat/lstat, because options.xstat takes account of
state.cwd_dir_fd.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 22:05:52 +01:00
James Youngman
25e7c5fbf9 Fix Savannah bug 29460, -printf %Y fails in $CWD-dependent way
* find/pred.c (do_fprintf): Use optionl_stat and optionp_stat
instead of stat and lstat, because the first two functions are
aware of state.cwd_dir_fd.
* find/testsuite/find.gnu/printf-nonlocal-symlink.exp: A new test
case for this bug.
* find/testsuite/find.gnu/printf-nonlocal-symlink.xo: Expected
output for this test.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add the new test
case.
(EXTRA_DIST_XO): Add the expected-output file.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 22:05:49 +01:00
James Youngman
c8f6b3d7fa Delete unused file lib/strspn.c
Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 21:50:34 +01:00
James Youngman
8562386a11 Update the maintenance manual.
* doc/find-maint.texi: Update the maintenance manual to take into
account the fact that we uniformly use git rather than CVS.  Point
out the new version tag format.  Mention "make coverage".
README-CVS is now called README-hacking.  Update the URL for the
Translation Project.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 21:46:44 +01:00
James Youngman
f9187a197d Eliminate some obsolete code.
* locate/locate.c (search_one_database): Remove obsolete code
(alternative size for procdata.pathsize).
* lib/buildcmd.c (get_line_max): Remove obsolete function.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 21:36:49 +01:00
James Youngman
d020204b5a Remove obsolete code from savedirinfo.c.
* lib/savedirinfo.c (new_savedirinfo): Rename new_savedirinfo to
savedirinfo.
(old_savedirinfo): Remove obsolete function body.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 21:36:00 +01:00
James Youngman
5b9e20405d Support extendbuf buffers larger than SIZE_MAX/2.
* lib/extendbuf.c (xextendbuf): New function; extends the buffer,
but calls xalloc_die on failure.  On the the other hand, extendbuf
returns NULL on failure.
(decide_size): If wanted>SIZE_MAX/2, return wanted.  This means
that for very large buffers, performance on repeated extension
degrades from linear to quadratic (instead of just failing at that
point, as before).
* lib/savedirinfo.c (xsavedir): Use xextendbuf rather than
extendbuf, now that there is a difference in semantics.
* find/fstype.c (get_mounted_filesystems): If extendbuf returns
NULL, fail (by returning NULL ourselves).
(get_mounted_devices): 	Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 21:35:02 +01:00
James Youngman
60416f1b56 Update Vietnamese translation.
Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 11:02:39 +01:00
James Youngman
66a94b60dc Use set_program_name in regexprops.
* lib/regexprops.c: Include "progname.h".  Update function
defintions to have a newline before the function name (to comply
with the GNU coding standard).  Use set_program_name.
2010-04-06 23:32:16 +01:00
James Youngman
5787e7ef1d Fix several merge errors.
* find/defs.h (struct state): Correct type of
already_issued_stat_error_msg from boolean to bool.
* find/util.c (report_file_err): Likewise with parameter
is_target_file.
* find/pred.c: Include "areadlink.h".
(do_fprintf): nonfatal_file_error should be
nonfatal_target_file_error.
(match_lname): Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-06 23:31:44 +01:00
James Youngman
798680e81d Update some translations.
* po/cs.po: Update Czech translation.
* po/nl.po: Update Dutch translation.
* po/pl.po: Update Polish translation.
* po/ru.po: Update Russian translation.
2010-04-06 22:59:24 +01:00
James Youngman
e1ce7f899b Make use of gnulib's areadlinkat.
* lib/listfile.c: #include "areadlink.h" but not "dircallback.h",
since we no longer need to use get_link_name_at.
(get_link_name_at): Delete.
(get_link_name_cb): Delete.
(get_link_name): Delete.
* lib/listfile.h: Remove declaration of get_link_name_at.
* find/pred.c (match_lname): Use areadlinkat instead of
get_link_name_at.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-06 22:52:05 +01:00
James Youngman
fb8705fc9f Add NEWS file entry too. 2010-04-06 22:50:15 +01:00
James Youngman
1e1e499692 Add ChangeLog entry for Matin's change 2010-04-06 22:50:15 +01:00
James Youngman
7e3d7a273f Don't issue an error message twice for the same target file.
* find/defs.h (struct state): New member,
already_issued_stat_error_msg, used to de-duplicate error
messages.  If it is true, we already issued an error message for
the current target file.
Declare fatal_target_file_error, fatal_nontarget_file_error,
nonfatal_target_file_error, nonfatal_nontarget_file_error.
Between them, they replace fatal_file_error and
nonfatal_file_error.  The *target_file_error versions are
de-duplicated and the nontarget_file_error_versions are not.
* find/util.c (nonfatal_nontarget_file_error): Implement.
(fatal_nontarget_file_error): Implement.
(nonfatal_target_file_error): Implement.
(fatal_target_file_error): Implement.
(fatal_file_error): Remove.
(nonfatal_file_error): Remove.
(error_severity): Define error_severity (moved from ftsfind.c)
(get_statinfo): Call nonfatal_target_file_error in order to avoid
a duplicate message.  ALso call error_severity after a different
call to error to preserve the constraint that we exit with a
nonzero status if we issue a diagnostic.
(cleanup): Call nonfatal_nontarget_file_error instead of
nonfatal_file_error.
* find/ftsfind.c (error_severity): Move to util.c.
* find/tree.c (build_expression_tree): Initialise
state.already_issued_stat_error_msg.
* find/find.c (main): Initialise state.already_issued_stat_error_msg.
(wd_sanity_check): Call fatal_target_file_error instead of
fatal_file_error.
(chdir_back): Call fatal_nontarget_file_error instead of
fatal_file_error.
(process_path): Initialise state.already_issued_stat_error_msg.
* find/ftsfind.c (consider_visiting): Call
nonfatal_target_file_error instead of calling error directly.
(find): Call error_severity to ensure exit status is nonzero after
a call to error.
(main): Initialise state.already_issued_stat_error_msg.
* find/parser.c (collect_arg_stat_info): Call
fatal_target_file_error instead of fatal_file_error.
(parse_newerXY): Likewise.
(parse_samefile): Likewise.
(parse_samefile): Likewise.
(open_output_file): Call fatal_nontarget_file_error instead of
fatal_file_error.
* find/pred.c (checked_fprintf): Likewise.
(checked_print_quoted): Likewise.
(checked_fwrite): Likewise.
(checked_fflush): Likewise.
* find/sharefile.c (entry_free): Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-06 22:50:15 +01:00
Martin von Gagern
20171febf2 Bug #27213: avoid failed assertions for non-executable directories.
Addresses Savannah bug #27213 - https://savannah.gnu.org/bugs/?27213

This used to fail in recent releases:
1. mkdir -p foo/bar
2. chmod a-x foo
3. find foo
4. find foo -ls

Now it will print error messages for the denied permission on foo, but will
not abort completely, and in 3. will even print the name foo/bar, while it
won't do so in 4., as the -ls predicate requires stat information. For now,
4. will print two identical error message. This should get fixed some day.
2010-04-06 22:48:39 +01:00
James Youngman
969f7feed3 Remove form-feeds.
* find/find.c: Remove form-feed characters.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-06 01:03:40 +01:00
James Youngman
1284636a2e Use the getopt-gnu module, not the obsolete getopt module.
* import-gnulib.config (modules): Use the getopt-gnu module from
gnulib rather than the (obsolete) getopt module.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-06 00:55:06 +01:00
James Youngman
6b93518007 Use bool instead of the previous typedef boolean.
* find/defs.h: Don't create typedef "boolean"; use the standard
type bool.  Update other declarations accordingly.
* find/find.c: Update declarations and function definitions to use
bool.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-05 20:52:45 +01:00
James Youngman
765ab106d4 Don't return int to represent a boolean value.
* find/defs.h: fd_leak_check_is_enabled should return boolean, not
int.  Likewise following_links and digest_mode.
* lib/buildcmd.h: Likewise for bc_args_exceed_testing_limit.
Also #include <stdbool.h>.
* find/util.c (fd_leak_check_is_enabled): Now returns boolean.
* find/util.c (following_links): Likewise.
* find/util.c (digest_mode): Likewise.
* lib/buildcmd.c (bc_args_exceed_testing_limit): Likewise.
* find/find.c (get_current_dirfd): Indent definition correctly.
* find/util.c (get_start_dirfd): Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-05 14:19:29 +01:00
Jim Meyering
f049c775a7 frcode: avoid link failure due to multiple program_name definitions
* locate/frcode.c: Include "progname.h".
(program_name): Remove two declarations.
Now the definition comes from gnulib.
2010-04-05 13:39:52 +01:00
James Youngman
a44cece85b Fix Savannah bug #29435: fd_is_cloexec does not work on Fedora buildhosts.
Fix open_cloexec on hosts which ignore O_CLOEXEC (i.e. old kernels).
* lib/fdleak.c (o_cloexec_works): New function, detects whether
the open flag O_CLOEXEC has any effect.
(open_cloexec): Call o_cloexec_works, just once, to find out
whether O_CLOEXEC is effective.  If not, set the close-on-exec
flag on fds by calling set_cloexec_flag.

Signed-off-by: James Youngman <jay@gnu.org>

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-04 12:07:15 +01:00
James Youngman
801b45c63d Update version numbers to indicate that the git repository no longer corresponds to the recent release 2010-04-03 15:52:40 +01:00
James Youngman
1f5cd46311 Prepare for release of findutils-4.5.7.
* configure.ac: Update version number.
* NEWS: Mention the translation changes.  Update version number.

Signed-off-by: James Youngman <jay@gnu.org>
v4.5.7
2010-04-03 14:40:45 +01:00
James Youngman
58ca72f90f Accelerate find/testsuite/find.posix/exec-nogaps.exp.
* find/testsuite/config/unix.exp (optimisation_levels_to_test):
New function, decides which optimisation levels we shuld run find
at for the current test.  Set $OPTIMISATION_LEVELS to control
this.
(find_start): Call optimisation_levels_to_test to determine which
optimisation levels to run find at.
* find/testsuite/find.posix/exec-nogaps.exp: Run the test only at
-O3 (but for both oldfind and ftsfind).

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 14:37:35 +01:00
James Youngman
37971fb470 Correct the format of copyright statements, and add 2010.
* lib/fdleak.h: Correct the format of the copyright statement.
* po/vi.po: Likewise.
* lib/safe-atoi.h: Likewise.
* locate/locate.c: Likewise.
* po/ca.po: Likewise.
* po/gl.po: Likewise.
* po/fi.po: Likewise.
* po/it.po: Likewise.
* po/findutils.pot: Fill in the boilerplate in the header.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 12:22:57 +01:00
James Youngman
781ac288c6 Update copyright years.
* find/defs.h: Update copyright years.
* find/finddata.c: Likewise.
* find/sharefile.h: Likewise.
* lib/buildcmd.h: Likewise.
* lib/dircallback.h: Likewise.
* lib/extendbuf.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/gnulib-version.h: Likewise.
* lib/listfile.h: Likewise.
* lib/nextelem.c: Likewise.
* lib/nextelem.h: Likewise.
* lib/printquoted.h: Likewise.
* lib/regextype.h: Likewise.
* lib/savedirinfo.h: Likewise.
* lib/strspn.c: Likewise.
* lib/waitpid.c: Likewise.
* locate/locatedb.h: Likewise.
* m4/mkinstalldirs.m4: Likewise.
* m4/noreturn.m4: Likewise.
* build-aux/check-testfiles.sh: Likewise.
* build-aux/src-sniff.py: Likewise.
* import-gnulib.sh: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/updatedb.sh: Likewise.
* xargs/testsuite/config/unix.exp: Likewise.
* po/*.po: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 12:22:57 +01:00
James Youngman
ead2b68cb8 Add the update-copyright gnulib module.
* import-gnulib.config (maintainer_modules): Separate out the
modules primarily useful for maintainer activities.  Add
'update-copyright' to this.
* build-aux/.cvsignore: Ignore update-copyright, since it's
installed by gnulib.
* build-aux/.gitignore: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 12:22:57 +01:00
James Youngman
0a1c5b8287 Ignore generated files for the convenience of non-VPATH users.
* lib/.gitignore: Ignore object and archive files.
* find/.gitignore: Likewise.
* locate/.gitignore: Ignore object files.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 12:22:57 +01:00
James Youngman
fef6e5fa5d Check for accidental modifications to the wrong section of the NEWS file.
* cfg.mk (local-checks-to-skip): Remove sc_immutable_news.
(old_NEWS_hash): add existing hash (from "make update-NEWS-hash").

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:11 +01:00
James Youngman
efd6e25a4b cfg.mk: simplify variables
* cfg.mk: Append the names of checks to skip to
local-checks-to-skip rather than inventing 7 new variables.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:11 +01:00
James Youngman
238b7d525b Don't include quote.h/quotearg.h where it is not used.
* find/find.c: Don't include "quote.h", it's not used.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* cfg.mk (skip_dunno): Enable check sc_prohibit_quote_without_use.
* find/find.c: Don't include "quotearg.h", it's not used.
* lib/fdleak.c: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:11 +01:00
James Youngman
a058767687 Use set_program_name() to remember the programs' names.
* cfg.mk *skip(defer): Enable sc_program_name.  Remove the
now-unused variable skip_defer.
* find/ftsfind.c: Include "program_name.h".
(main): Call set_program_name.
* find/find.c: Include "program_name.h".
(main): Call set_program_name.
* locate/locate.c: Include "program_name.h".
(dolocate): Call set_program_name.
Remove global variable program_name.
* locate/bigram.c: Include "program_name.h".
Remove global variable "program_name".
(main): Call set_program_name.
* locate/frcode.c: Include "program_name.h".
(main): Call set_program_name.
* xargs/xargs.c (main): Call set_program_name.
Include "program_name.h".
Remove global variable program_name.
* find/finddata.c: Remove global variable program_name.
* find/defs.h: No longer need declaration of program_name.
* find/util.c: Include "program_name.h".

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:11 +01:00
James Youngman
7ad98986ff Avoid using magic numbers as exit statuses.
Avoid using magic numbers as exit statuses.
* cfg.mk (skip_defer): Enable sc_prohibit_magic_number_exit.
* doc/find-maint.texi (Security): Avoid error (1, ...) in the
example patch.
* find/find.c (main): Use exit status EXIT_FAILURE instead of 1.
(wd_sanity_check): Likewise.
(safely_chdir_lstat): Likewise.
(process_dir): Likewise.
* find/fstype.c (must_read_fs_list): Likewise.
* find/ftsfind.c (main): Likewise.
(main): Likewise.
* find/parser.c (check_option_combinations): Use exit status
EXIT_FAILURE instead of 1.
(parse_group): Likewise.
(parse_help): Use exit status EXIT_SUCCESS instead of 0.
(parse_version): Likewise.
(fnmatch_sanitycheck): Use exit status EXIT_FAILURE instead of 1.
(insert_depthspec): Likewise.
(parse_newerXY): Likewise.
(non_posix_mode): Likewise.
(parse_perm): Likewise.
(insert_regex): Likewise.
(parse_size): Likewise.
(parse_show_control_chars): Likewise.
(parse_used): Likewise.
(parse_user): Likewise.
(parse_context): Likewise.
(insert_type): Likewise.
(insert_fprintf): Likewise.
(make_segment): Likewise.
(check_path_safety): Likewise.
(new_insert_exec_ok): Likewise.
(get_relative_timestamp): Likewise.
(parse_time): Likewise.
* find/tree.c (get_expr): Use exit status EXIT_FAILURE instead of 1.
(scan_rest): Likewise.
(get_pred_cost): Likewise.
(get_pred_cost): Likewise.
(build_expression_tree): Likewise.
(get_new_pred_chk_op): Likewise.
* find/pred.c (launch): Use exit status EXIT_FAILURE instead of 1.
* find/util.c (process_debug_options): Use exit status
EXIT_SUCCESS instead of 0.
(process_optimisation_option): Use exit status EXIT_FAILURE
instead of 1.
(set_option_defaults): Likewise.
* lib/buildcmd.c (exceeds): Likewise.
(bc_do_exec): Likewise.
(bc_push_arg): Likewise.
* lib/nextelem.c: Remove test code.
* lib/safe-atoi.c (safe_atoi): Use exit status EXIT_FAILURE
instead of 1.
* lib/regextype.c (get_regex_type): Use exit status EXIT_FAILURE
instead of 1.  Include <stdlib.h>, for EXIT_FAILURE.
* locate/locate.c (set_max_db_age): Use exit status EXIT_FAILURE
instead of 1.
(set_max_db_age): Likewise.
(toolong): Likewise.
(visit_locate02_format): Likewise.
(search_one_database): Likewise.
(drop_privs): Likewise.
* locate/frcode.c (get_seclevel): Use exit status EXIT_FAILURE
instead of 1.
(outerr): Likewise.
(main): Likewise.
* locate/code.c (inerr): Use exit status EXIT_FAILURE instead of
1.
(outerr): Likewise.
* locate/word_io.c (getword): Use exit status EXIT_FAILURE instead of 1.

Use named constants for xargs exit codes.
* xargs/xargs.c (child_error): Use EXIT_SUCCESS instead of 0.
(enum XargsStatusValues): introduce named constants for the
various things that cause speicific exit codes.
(enum  ClientStatusValues): Also introduce named constants for the
child's exit status.
(get_char_oct_or_hex_escape): Use EXIT_FAILURE instead of 1.
(get_input_delimiter): Likewise.
(main): Likewise.
(read_line): Likewise.
(read_string): Likewise.
(print_args): Likewise.
(xargs_do_exec): Likewise.
(wait_for_proc): Likewise.
(wait_for_proc): Use enum XargsStatusValues for exit codes.
(parse_num): Use EXIT_FAILURE instead of 1.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:11 +01:00
James Youngman
bcc0287a0d Avoid sc_prohibit_stat_st_blocks check, since it is broken.
* cfg.mk (skip_broken_checks): Skip sc_prohibit_stat_st_blocks.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:10 +01:00
James Youngman
ff9af635b0 Enable syntax checker sc_the_the, detecting doubled 'the'.
* cfg.mk (false_positives): Enable syntax checker sc_the_the
* build-aux/src-sniff.py (checkers): Avoid false positive with
sc_the_the.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:10 +01:00
James Youngman
3ec1c93946 sc_prohibit_strcmp gives false positives when neither argument is a constant, so skip that check 2010-04-03 10:08:10 +01:00
James Youngman
77b97a0ec4 Avoid sscanf. Avoid false positives for sc_prohibit_atoi_atof.
* lib/fdleak.c (get_proc_max_fd): Use safe_atoi to do string to
int conversion, instead of sscanf.  Skip '.' and '..'.
* find/util.c (set_option_defaults): Avoid false positive with
sc_prohibit_atoi_atof.
(check_nofollow): Likewise.
* cfg.mk (skip_defer): Enable the sc_prohibit_atoi_atof check.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:10 +01:00
James Youngman
2629fdd269 Remove files which exist but have no translated messages.
* po/POTFILES.in: Remove dircallback.c, listfile.c.
* lib/listfile.c: Don't include libintl, since there are no
translated messages in this file.
* lib/dircallback.c: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:10 +01:00
James Youngman
6d49662c42 Remove some obsolete source files from POTFILES.in 2010-04-03 10:08:10 +01:00
James Youngman
660945c876 Move safe_atoi out into a separate module.
* find/parser.c: Include "safe-atoi.h".  Remove the body of safe_atoi.
(parse_group): pass options.err_quoting_style to safe_atoi.
(insert_depthspec): Likewise.
(parse_user): Likewise.
* lib/safe-atoi.h: New file.
* lib/safe-atoi.c: New file.  Add parameter for quoting style (to
avoid an external reference to the "options"struct).
* lib/Makefile.am (libfind_a_SOURCES): Add safe-atoi.c and
safe-atoi.h.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:06 +01:00
James Youngman
7027ce445a configure.ac: Quote the first argument to AC_DEFINE 2010-04-03 10:07:30 +01:00
James Youngman
aca33f8515 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.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:07:30 +01:00
James Youngman
aebcd8c049 Don't include xalloc.h where we don't use it.
* find/ftsfind.c: We don't use anything from xalloc.h, so don't

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:07:30 +01:00
James Youngman
aca096484c Fix some compilation unused-result and missing-declaration warnings.
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.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:07:30 +01:00
James Youngman
6115892b33 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>
2010-04-03 10:07:29 +01:00
James Youngman
be821d9d87 * 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.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:07:29 +01:00