mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions
* src/ls.c (DEFINE_SORT_FUNCTIONS): Apply _GL_ATTRIBUTE_PURE to each strcmp-derived function definition, since GCC8 with -Wsuggest-attribute=pure now warns it is needed.
This commit is contained in:
1 parent
61a8b5cb56
commit
f89c20bdf7
1 file changed
+4
-4
@@ -3603,25 +3603,25 @@ typedef int (*qsortFunc)(V a, V b);
|
||||
/* direct, non-dirfirst versions */ \
|
||||
static int xstrcoll_##key_name (V a, V b) \
|
||||
{ return key_cmp_func (a, b, xstrcoll); } \
|
||||
static int strcmp_##key_name (V a, V b) \
|
||||
static int _GL_ATTRIBUTE_PURE strcmp_##key_name (V a, V b) \
|
||||
{ return key_cmp_func (a, b, strcmp); } \
|
||||
\
|
||||
/* reverse, non-dirfirst versions */ \
|
||||
static int rev_xstrcoll_##key_name (V a, V b) \
|
||||
{ return key_cmp_func (b, a, xstrcoll); } \
|
||||
static int rev_strcmp_##key_name (V a, V b) \
|
||||
static int _GL_ATTRIBUTE_PURE rev_strcmp_##key_name (V a, V b) \
|
||||
{ return key_cmp_func (b, a, strcmp); } \
|
||||
\
|
||||
/* direct, dirfirst versions */ \
|
||||
static int xstrcoll_df_##key_name (V a, V b) \
|
||||
{ DIRFIRST_CHECK (a, b); return key_cmp_func (a, b, xstrcoll); } \
|
||||
static int strcmp_df_##key_name (V a, V b) \
|
||||
static int _GL_ATTRIBUTE_PURE strcmp_df_##key_name (V a, V b) \
|
||||
{ DIRFIRST_CHECK (a, b); return key_cmp_func (a, b, strcmp); } \
|
||||
\
|
||||
/* reverse, dirfirst versions */ \
|
||||
static int rev_xstrcoll_df_##key_name (V a, V b) \
|
||||
{ DIRFIRST_CHECK (a, b); return key_cmp_func (b, a, xstrcoll); } \
|
||||
static int rev_strcmp_df_##key_name (V a, V b) \
|
||||
static int _GL_ATTRIBUTE_PURE rev_strcmp_df_##key_name (V a, V b) \
|
||||
{ DIRFIRST_CHECK (a, b); return key_cmp_func (b, a, strcmp); }
|
||||
|
||||
static inline int
|
||||
|
||||
Reference in new issue
Block a user