-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix capability-to/from-integer-cast compiler warnings on CHERI
Issue #627 (bdwgc). Cast between numeric and pointer through GC_uintptr_t instead of word. * cord/tests/de_win.c [CPPCHECK] (WinMain): Cast a pointer to word through GC_uintptr_t. * include/gc/gc.h [!__GNUC__ || __CHERI_PURE_CAPABILITY__] (GC_ADDR_LT): Likewise. * include/gc/gc_cpp.h (gc_cleanup::cleanup): Likewise. * include/gc/gc_inline.h (GC_FAST_MALLOC_GRANS): Likewise. * include/private/gc_priv.h (ADDR): Likewise. * pthread_support.c [PARALLEL_MARK] (GC_mark_thread): Likewise. * tests/subthreadcreate.c (entry): Likewise. * gcj_mlc.c [FUNCPTR_IS_DATAPTR && CPPCHECK] (GC_gcj_fake_mark_proc): Cast to word through GC_funcptr_uint. * os_dep.c [MPROTECT_VDB && DARWIN && CPPCHECK] (GC_dirty_init): Likewise. * include/gc/gc.h [include/gc/gc.h [] (GC_HIDE_NZ_POINTER): Cast p to intptr_t instead of GC_signed_word. * include/private/gc_hdrs.h (FORWARDED_ADDR): Cast to size_t through GC_uintptr_t. * include/private/gc_locks.h [GC_PTHREADS && !GC_WIN32_PTHREADS] (NUMERIC_THREAD_ID): Cast to unsigned long through GC_uintptr_t. * include/private/gc_priv.h (NUMERIC_TO_VPTR, MAKE_CPTR): Cast to pointer through GC_uintptr_t. * include/private/gcconfig.h [I386 && DGUX] (MAP_FAILED): Likewise. * pthread_stop_world.c (GC_suspend_all, GC_restart_all): Likewise. * tests/staticroots.c (root_nz): Likewise. * tests/staticroots_lib.c (root_nz): Likewise. * tests/subthreadcreate.c (main): Likewise. * include/private/gc_priv.h (CPTR_CLEAR_FLAGS, CPTR_SET_FLAGS): Cast pointer to GC_uintptr_t instead of word. * include/private/gcconfig.h (PTR_ALIGN_DOWN, PTR_ALIGN_UP): Likewise. * tests/cpp.cc (D::CleanUp): Likewise. * tests/cpp.cc [CPPCHECK] (WinMain): Likewise. * tests/cpp.cc [!CPPCHECK] (main): Likewise. * tests/weakmap.c (IS_FLAG_SET): Likewise. * pthread_support.c [DEBUG_THREADS && !GC_WIN32_PTHREADS] (GC_new_thread, GC_delete_thread, GC_unregister_my_thread_inner, GC_thread_exit_proc): Cast to pointer through GC_uintptr_t instead of signed_word. * tests/gctest.c (SEXPR_TO_INT): Cast pointer to int through GC_uintptr_t instead of GC_word. * tests/initfromthread.c [!GC_PTHREADS] (thread): Cast to DWORD through GC_uintptr_t instead of GC_word. * tests/threadleak.c [!GC_PTHREADS] (test): Likewise. * win32_threads.c (GC_win32_start): Likewise. * win32_threads.c [GC_WINMAIN_REDIRECT] (WinMain): Likewise. * tests/threadkey.c (on_thread_exit): Cast unused result to void.
- Loading branch information
Showing
22 changed files
with
66 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters