summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2016-05-13 21:18:10 +0000
committerjasone <jasone@FreeBSD.org>2016-05-13 21:18:10 +0000
commit143d166db208ab898647224b012674b29bc8e3f3 (patch)
treedb2373f6ef44c015ed8a259393be31c81e098ce9
parente5e9f7f706cc08c047d646c2d1ab59266a070667 (diff)
downloadFreeBSD-src-143d166db208ab898647224b012674b29bc8e3f3.zip
FreeBSD-src-143d166db208ab898647224b012674b29bc8e3f3.tar.gz
Work around invalid gcc warning (explicit cast apparently lost).
-rw-r--r--contrib/jemalloc/FREEBSD-diffs32
-rw-r--r--contrib/jemalloc/include/jemalloc/internal/arena.h10
2 files changed, 42 insertions, 0 deletions
diff --git a/contrib/jemalloc/FREEBSD-diffs b/contrib/jemalloc/FREEBSD-diffs
index 6c20441..6b5e52b 100644
--- a/contrib/jemalloc/FREEBSD-diffs
+++ b/contrib/jemalloc/FREEBSD-diffs
@@ -46,6 +46,38 @@ index c4a44e3..4626e9b 100644
+ in FreeBSD 11.0.</para>
+ </refsect1>
</refentry>
+diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
+index b1de2b6..da6b6d2 100644
+--- a/include/jemalloc/internal/arena.h
++++ b/include/jemalloc/internal/arena.h
+@@ -718,8 +718,13 @@ arena_miscelm_get_mutable(arena_chunk_t *chunk, size_t pageind)
+ JEMALLOC_ALWAYS_INLINE const arena_chunk_map_misc_t *
+ arena_miscelm_get_const(const arena_chunk_t *chunk, size_t pageind)
+ {
++#if 1 /* Work around gcc bug. */
++ arena_chunk_t *mchunk = (arena_chunk_t *)chunk;
+
++ return (arena_miscelm_get_mutable(mchunk, pageind));
++#else
+ return (arena_miscelm_get_mutable((arena_chunk_t *)chunk, pageind));
++#endif
+ }
+
+ JEMALLOC_ALWAYS_INLINE size_t
+@@ -778,8 +783,13 @@ arena_mapbitsp_get_mutable(arena_chunk_t *chunk, size_t pageind)
+ JEMALLOC_ALWAYS_INLINE const size_t *
+ arena_mapbitsp_get_const(const arena_chunk_t *chunk, size_t pageind)
+ {
++#if 1 /* Work around gcc bug. */
++ arena_chunk_t *mchunk = (arena_chunk_t *)chunk;
+
++ return (arena_mapbitsp_get_mutable(mchunk, pageind));
++#else
+ return (arena_mapbitsp_get_mutable((arena_chunk_t *)chunk, pageind));
++#endif
+ }
+
+ JEMALLOC_ALWAYS_INLINE size_t
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index 51bf897..7de22ea 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
diff --git a/contrib/jemalloc/include/jemalloc/internal/arena.h b/contrib/jemalloc/include/jemalloc/internal/arena.h
index b1de2b61..da6b6d2 100644
--- a/contrib/jemalloc/include/jemalloc/internal/arena.h
+++ b/contrib/jemalloc/include/jemalloc/internal/arena.h
@@ -718,8 +718,13 @@ arena_miscelm_get_mutable(arena_chunk_t *chunk, size_t pageind)
JEMALLOC_ALWAYS_INLINE const arena_chunk_map_misc_t *
arena_miscelm_get_const(const arena_chunk_t *chunk, size_t pageind)
{
+#if 1 /* Work around gcc bug. */
+ arena_chunk_t *mchunk = (arena_chunk_t *)chunk;
+ return (arena_miscelm_get_mutable(mchunk, pageind));
+#else
return (arena_miscelm_get_mutable((arena_chunk_t *)chunk, pageind));
+#endif
}
JEMALLOC_ALWAYS_INLINE size_t
@@ -778,8 +783,13 @@ arena_mapbitsp_get_mutable(arena_chunk_t *chunk, size_t pageind)
JEMALLOC_ALWAYS_INLINE const size_t *
arena_mapbitsp_get_const(const arena_chunk_t *chunk, size_t pageind)
{
+#if 1 /* Work around gcc bug. */
+ arena_chunk_t *mchunk = (arena_chunk_t *)chunk;
+ return (arena_mapbitsp_get_mutable(mchunk, pageind));
+#else
return (arena_mapbitsp_get_mutable((arena_chunk_t *)chunk, pageind));
+#endif
}
JEMALLOC_ALWAYS_INLINE size_t
OpenPOWER on IntegriCloud