From 84d048002e423dc85ae99bbb3372cd48dc1bfe72 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 24 Apr 2011 19:06:39 +0200 Subject: maint: use "const" and "pure" function attributes where possible * configure.ac (WARN_CFLAGS): Add -Wsuggest-attribute=const, -Wsuggest-attribute=pure and -Wsuggest-attribute=noreturn. (GNULIB_WARN_CFLAGS): But do not add them here... yet. * src/chown-core.h (chopt_free, uid_to_name): Add function attribute(s). * src/copy.c (is_ancestor, valid_options): Likewise. * src/copy.h (chown_failure_ok): Likewise. * src/dd.c (operand_matches, operand_is): Likewise. * src/df.c (selected_fstype, excluded_fstype): Likewise. * src/expr.c (null looks_like_integer): Likewise. * src/md5sum.c (hex_digits): Likewise. * src/od.c (get_lcm): Likewise. * src/pathchk.c (component_start, component_len): Likewise. * src/pinky.c (count_ampersands): Likewise. * src/pr.c (cols_ready_to_print): Likewise. * src/ptx.c (search_table): Likewise. * src/sort.c (find_unit_order): Likewise. * src/stty.c (mode_type_flag, string_to_baud, baud_to_value): Likewise. * src/system.h (gcd, lcm): Likewise. * src/tr.c (is_char_class_member, look_up_char_class): Likewise. (star_digits_closebracket): Likewise. * src/uniq.c (find_field): Likewise. * src/wc.c (compute_number_width): Likewise. * lib/xfts.h (cycle_warning_required): Likewise. * gl/lib/randint.h (randint_get_source): Likewise. * gl/lib/randperm.c (ceil_lg): Likewise. * gl/lib/randperm.h (randperm_bound): Likewise. * lib/strnumcmp.h (strintcmp): Likewise. --- src/copy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/copy.h') diff --git a/src/copy.h b/src/copy.h index 5014ea9ae..7332c7c7f 100644 --- a/src/copy.h +++ b/src/copy.h @@ -282,7 +282,7 @@ void dest_info_init (struct cp_options *); void src_info_init (struct cp_options *); void cp_options_default (struct cp_options *); -bool chown_failure_ok (struct cp_options const *); +bool chown_failure_ok (struct cp_options const *) _GL_ATTRIBUTE_PURE; mode_t cached_umask (void); #endif -- cgit v1.2.3-54-g00ecf