]> Savannah Git Hosting - gnulib.git/commitdiff
linked-list, linkedhash-list: avoid compiler warnings
authorPádraig Brady <P@draigBrady.com>
Fri, 19 Jun 2015 13:06:17 +0000 (14:06 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 19 Jun 2015 13:07:05 +0000 (14:07 +0100)
* lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
-Werror=suggest-attribute=pure (from GCC 5.1.1).

ChangeLog
lib/gl_anylinked_list2.h

index 66df3da8e9f5da9e7b3ce8022e0f65ca40ac6236..a9524fd9fce54280393aad5837d26b7ebb412062 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 12f732e1b2bc627a4ab84fe1e9b9280af026751e..5ba28064b8c6ef2944b078de12652317b28d2f90 100644 (file)
@@ -163,13 +163,13 @@ gl_linked_nx_create (gl_list_implementation_t implementation,
   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 @@ gl_linked_node_nx_set_value (gl_list_t list, gl_list_node_t node,
   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 @@ gl_linked_nx_set_at (gl_list_t list, size_t position, const void *elt)
   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 @@ gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
   }
 }
 
-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 @@ gl_linked_iterator_free (gl_list_iterator_t *iterator)
 
 /* ---------------------- 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 @@ gl_linked_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar,
   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 @@ gl_linked_sortedlist_search_from_to (gl_list_t list,
   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 @@ gl_linked_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar,
   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,