On Sun, 2008-06-01 at 13:43 +1000, Bojan Smojver wrote:

> This patch avoids the warning for me. Not sure if it makes any sense at
> all...

Actually, there is no need for that (char *) cast.

-- 
Bojan
Index: include/apr_ring.h
===================================================================
--- include/apr_ring.h	(revision 662126)
+++ include/apr_ring.h	(working copy)
@@ -156,8 +156,16 @@
  * @param elem The name of the element struct
  * @param link The name of the APR_RING_ENTRY in the element struct
  */
+#if APR_HAS_INLINE
+static APR_INLINE char *apr_ring_head(void *hp) {
+    return hp;
+}
 #define APR_RING_SENTINEL(hp, elem, link)				\
+    (struct elem *)(apr_ring_head((hp) - APR_OFFSETOF(struct elem, link)))
+#else
+#define APR_RING_SENTINEL(hp, elem, link)				\
     (struct elem *)((char *)(hp) - APR_OFFSETOF(struct elem, link))
+#endif
 
 /**
  * The first element of the ring

Reply via email to