Mercurial > gnulib
changeset 18019:e8ab47202b0b
linked-list, linkedhash-list: avoid compiler warnings
* lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
-Werror=suggest-attribute=pure (from GCC 5.1.1).
author | Pádraig Brady <P@draigBrady.com> |
---|---|
date | Fri, 19 Jun 2015 14:06:17 +0100 |
parents | 591bd18735af |
children | 12844a6aa2e0 |
files | ChangeLog lib/gl_anylinked_list2.h |
diffstat | 2 files changed, 17 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Jun 19 14:31:19 2015 +0900 +++ b/ChangeLog Fri Jun 19 14:06:17 2015 +0100 @@ -1,3 +1,9 @@ +2015-06-19 Pádraig Brady <P@draigBrady.com> + + linked-list, linkedhash-list: avoid compiler warnings + * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid + -Werror=suggest-attribute=pure (from GCC 5.1.1). + 2015-06-19 Daiki Ueno <ueno@gnu.org> libunistring: bump minimum version to 0.9.6
--- a/lib/gl_anylinked_list2.h Fri Jun 19 14:31:19 2015 +0900 +++ b/lib/gl_anylinked_list2.h Fri Jun 19 14:06:17 2015 +0100 @@ -163,13 +163,13 @@ return NULL; } -static size_t +static size_t _GL_ATTRIBUTE_PURE gl_linked_size (gl_list_t list) { return list->count; } -static const void * +static const void * _GL_ATTRIBUTE_PURE gl_linked_node_value (gl_list_t list, gl_list_node_t node) { return node->value; @@ -215,19 +215,19 @@ return 0; } -static gl_list_node_t +static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_next_node (gl_list_t list, gl_list_node_t node) { return (node->next != &list->root ? node->next : NULL); } -static gl_list_node_t +static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_previous_node (gl_list_t list, gl_list_node_t node) { return (node->prev != &list->root ? node->prev : NULL); } -static const void * +static const void * _GL_ATTRIBUTE_PURE gl_linked_get_at (gl_list_t list, size_t position) { size_t count = list->count; @@ -312,7 +312,7 @@ return node; } -static gl_list_node_t +static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { @@ -465,7 +465,7 @@ } } -static size_t +static size_t _GL_ATTRIBUTE_PURE gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { @@ -1027,7 +1027,7 @@ /* ---------------------- Sorted gl_list_t Data Type ---------------------- */ -static gl_list_node_t +static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { @@ -1045,7 +1045,7 @@ return NULL; } -static gl_list_node_t +static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t low, size_t high, @@ -1093,7 +1093,7 @@ return NULL; } -static size_t +static size_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { @@ -1114,7 +1114,7 @@ return (size_t)(-1); } -static size_t +static size_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t low, size_t high,