1. Andrew Dunstan
  2. pgdevel

Commits

Tom Lane  committed e78d288

Add explicit casts in ilist.h's inline functions.

Needed to silence C++ errors, per report from Peter Eisentraut.

Andres Freund

  • Participants
  • Parent commits 1f67078
  • Branches jsonapi

Comments (0)

Files changed (1)

File src/include/lib/ilist.h

View file
 STATIC_IF_INLINE dlist_node *
 dlist_head_node(dlist_head *head)
 {
-	return dlist_head_element_off(head, 0);
+	return (dlist_node *) dlist_head_element_off(head, 0);
 }
 
 /* internal support function to get address of tail element's struct */
 STATIC_IF_INLINE dlist_node *
 dlist_tail_node(dlist_head *head)
 {
-	return dlist_tail_element_off(head, 0);
+	return (dlist_node *) dlist_tail_element_off(head, 0);
 }
 #endif   /* PG_USE_INLINE || ILIST_INCLUDE_DEFINITIONS */
 
 STATIC_IF_INLINE slist_node *
 slist_head_node(slist_head *head)
 {
-	return slist_head_element_off(head, 0);
+	return (slist_node *) slist_head_element_off(head, 0);
 }
 #endif   /* PG_USE_INLINE || ILIST_INCLUDE_DEFINITIONS */