summaryrefslogtreecommitdiffstats
path: root/libidu/scanners.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-28 18:23:36 +0100
committerJim Meyering <meyering@redhat.com>2012-01-31 13:22:05 +0100
commit6835b68f981f53f9b91680e9acfb64cdfc6b870b (patch)
treef447c4e4ee83f4f50ab1866d9716e02737444921 /libidu/scanners.h
parent7cc3d956e660c42c1597e4cc6521f94454f9a8b0 (diff)
downloadidutils-6835b68f981f53f9b91680e9acfb64cdfc6b870b.tar.gz
idutils-6835b68f981f53f9b91680e9acfb64cdfc6b870b.tar.bz2
idutils-6835b68f981f53f9b91680e9acfb64cdfc6b870b.zip
build: add const and pure attributes, per gcc recommendation
* src/mkid.c (ceil_log_8, ceil_log_2): Add "const" attribute. (token_hash_1, token_hash_2): Add "pure" attribute. (token_hash_cmp, token_qsort_cmp): Likewise. (count_vec_size, count_buf_size): Likewise. * libidu/idu-hash.c (round_up_2): Add "const" attribute. * libidu/scanners.h (get_language): Add "pure" attribute. * libidu/idfile.h (token_flags): Likewise. (token_count): Likewise. (member_file_qsort_compare): Likewise. (tree8_count_levels): Add "const" attribute. * libidu/walker.c (symlink_ancestry): Add "pure" attribute. (links_depth): Likewise. (file_link_hash_1): Likewise. (vector_length): Likewise. (file_link_hash_compare): Likewise. (string_in_vector): Likewise. * src/lid.c (vector_cardinality, get_radix, dtoi, otoi): Likewise. (is_regexp): Likewise. (vector_length): Remove forward decl and move function definition to precede first use.
Diffstat (limited to 'libidu/scanners.h')
-rw-r--r--libidu/scanners.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libidu/scanners.h b/libidu/scanners.h
index cc0dad0..b20ec3c 100644
--- a/libidu/scanners.h
+++ b/libidu/scanners.h
@@ -63,7 +63,8 @@ struct lang_args
extern void language_help_me (void);
extern void language_getopt (void);
extern void language_save_arg (char *arg);
-extern struct language *get_language (char const *lang_name);
+extern struct language *get_language (char const *lang_name)
+ _GL_ATTRIBUTE_PURE;
extern void parse_language_map (char const *file_name);
extern void set_default_language (char const *lang_name);