diff options
-rw-r--r-- | shape.c | 18 | ||||
-rw-r--r-- | thread_win32.c | 2 |
2 files changed, 10 insertions, 10 deletions
@@ -98,6 +98,15 @@ redblack_find(redblack_node_t * tree, ID key) } } +static inline rb_shape_t * +redblack_value(redblack_node_t * node) +{ + // Color is stored in the bottom bit of the shape pointer + // Mask away the bit so we get the actual pointer back + return (rb_shape_t *)((uintptr_t)node->value & (((uintptr_t)-1) - 1)); +} + +#ifdef HAVE_MMAP static inline char redblack_color(redblack_node_t * node) { @@ -110,15 +119,6 @@ redblack_red_p(redblack_node_t * node) return redblack_color(node) == RED; } -static inline rb_shape_t * -redblack_value(redblack_node_t * node) -{ - // Color is stored in the bottom bit of the shape pointer - // Mask away the bit so we get the actual pointer back - return (rb_shape_t *)((uintptr_t)node->value & (((uintptr_t)-1) - 1)); -} - -#ifdef HAVE_MMAP static redblack_id_t redblack_id_for(redblack_node_t * node) { diff --git a/thread_win32.c b/thread_win32.c index 74015b463b..1e2d4bdd19 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -589,7 +589,7 @@ rb_native_cond_destroy(rb_nativethread_cond_t *cond) {if (!(expr)) {rb_bug("err: %lu - %s", GetLastError(), #expr);}} COMPILER_WARNING_PUSH -#if defined(__GNUC__) +#if __has_warning("-Wmaybe-uninitialized") COMPILER_WARNING_IGNORED(-Wmaybe-uninitialized) #endif static inline SIZE_T |