diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-10-21 01:54:17 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-10-21 01:54:17 +0300 |
commit | e421fee566ab8cd71d557ef838d1f02e196e761a (patch) | |
tree | 85ec36c1850e789cd4e054b2a472f441bb2d4fab /cord | |
parent | a117f6c50b082cdd5696af179e6167e5248358b6 (diff) | |
download | bdwgc-e421fee566ab8cd71d557ef838d1f02e196e761a.tar.gz |
Eliminate 'printf format specifies type void*' GCC pedantic warnings
Explicitly cast pointer arguments (passed to printf and ABORT_ARGn) to
void* to match %p format specifier.
* allchblk.c [!NO_DEBUGGING] (GC_dump_regions): Cast arguments to
void* those printf format specifier is %p.
* alloc.c [!NO_DEBUGGING] (GC_print_heap_sects): Likewise.
* backgraph.c [MAKE_BACK_GRAPH] (backwards_height): Likewise.
* blacklst.c (GC_default_print_heap_obj_proc): Likewise.
* blacklst.c [PRINT_BLACK_LIST] (GC_print_blacklisted_ptr): Likewise.
* cord/cordbscs.c (CORD_dump_inner): Likewise.
* darwin_stop_world.c [DEBUG_THREADS_EXTRA] (GC_FindTopOfStack):
Likewise.
* darwin_stop_world.c [DEBUG_THREADS] (GC_stack_range_for): Likewise.
* dbg_mlc.c (GC_print_obj): Likewise.
* dbg_mlc.c [!SHORT_DBG_HDRS] (GC_print_smashed_obj): Likewise.
* dyn_load.c [HAVE_DL_ITERATE_PHDR]
(GC_register_dynamic_libraries_dl_iterate_phdr): Likewise.
* dyn_load.c [IRIX5] (GC_register_dynamic_libraries): Likewise.
* finalize.c [!NO_DEBUGGING] (GC_dump_finalization_links,
GC_dump_finalization): Likewise.
* include/private/gc_pmark.h [MARK_BIT_PER_GRANULE || MARK_BIT_PER_OBJ]
(PUSH_CONTENTS_HDR): Likewise.
* mark.c [ENABLE_TRACE] (GC_mark_from): Likewise.
* mark_rts.c [!NO_DEBUGGING] (GC_print_static_roots): Likewise.
* mark_rts.c [DEBUG_ADD_DEL_ROOTS] (GC_add_roots_inner,
GC_remove_root_at_pos): Likewise.
* misc.c [ENABLE_TRACE] (GC_init): Likewise.
* os_dep.c [LINUX || HURD] (GC_init_linux_data_start): Likewise.
* os_dep.c [!OS2 && !MSWIN32] (GC_register_data_segments): Likewise.
* os_dep.c [USE_MUNMAP && !USE_WINALLOC && !NACL] (GC_remap): Likewise.
* os_dep.c [!DARWIN && !MSWIN32 && !MSWINCE] (GC_write_fault_handler):
Likewise.
* os_dep.c [PROC_VDB && DEBUG_DIRTY_BITS] (GC_read_dirty): Likewise.
* os_dep.c [MPROTECT_VDB && DARWIN && BROKEN_EXCEPTION_HANDLING]
(catch_exception_raise): Likewise.
* pthread_stop_world.c [DEBUG_THREADS] (GC_push_all_stacks): Likewise.
* pthread_support.c [DEBUG_THREADS] (GC_unregister_my_thread_inner,
GC_unregister_my_thread, GC_start_rtn_prepare_thread): Likewise.
* reclaim.c [!NO_DEBUGGING] (GC_print_free_list): Likewise.
* specific.c [USE_CUSTOM_SPECIFIC && GC_ASSERTIONS]
(GC_check_tsd_marks): Likewise.
* win32_threads.c [DEBUG_THREADS] (GC_push_stack_for): Likewise.
* win32_threads.c [GC_PTHREADS && DEBUG_THREADS] (GC_pthread_join,
GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc):
Likewise.
* dbg_mlc.c: Remove duplicate check of SHORT_DBG_HDRS.
* include/private/gc_pmark.h [MARK_BIT_PER_GRANULE || MARK_BIT_PER_OBJ]
(PUSH_CONTENTS_HDR): Add missing parentheses around "source" argument
when casting it to ptr_t.
Diffstat (limited to 'cord')
-rw-r--r-- | cord/cordbscs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c index b47cad34..6db4ef27 100644 --- a/cord/cordbscs.c +++ b/cord/cordbscs.c @@ -126,14 +126,14 @@ void CORD_dump_inner(CORD x, unsigned n) register struct Concatenation * conc = &(((CordRep *)x) -> concatenation); printf("Concatenation: %p (len: %d, depth: %d)\n", - x, (int)(conc -> len), (int)(conc -> depth)); + (void *)x, (int)(conc -> len), (int)(conc -> depth)); CORD_dump_inner(conc -> left, n+1); CORD_dump_inner(conc -> right, n+1); } else /* function */{ register struct Function * func = &(((CordRep *)x) -> function); if (IS_SUBSTR(x)) printf("(Substring) "); - printf("Function: %p (len: %d): ", x, (int)(func -> len)); + printf("Function: %p (len: %d): ", (void *)x, (int)(func -> len)); for (i = 0; i < 20 && i < func -> len; i++) { putchar((*(func -> fn))(i, func -> client_data)); } |