From: Paul Floyd Date: Sun, 3 Nov 2024 10:25:47 +0000 (+0100) Subject: clangd fixes X-Git-Tag: VALGRIND_3_25_0~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d3e980dbf3b0df47a58a347e8a9a9bdc3add712;p=thirdparty%2Fvalgrind.git clangd fixes Mainly useless casts and consistent function prototype and definition arg names. --- diff --git a/VEX/priv/guest_amd64_defs.h b/VEX/priv/guest_amd64_defs.h index f9a9a9097..f7a4e06c0 100644 --- a/VEX/priv/guest_amd64_defs.h +++ b/VEX/priv/guest_amd64_defs.h @@ -48,15 +48,15 @@ /* Convert one amd64 insn to IR. See the type DisOneInstrFn in guest_generic_bb_to_IR.h. */ extern -DisResult disInstr_AMD64 ( IRSB* irbb, - const UChar* guest_code, +DisResult disInstr_AMD64 ( IRSB* irsb_IN, + const UChar* guest_code_IN, Long delta, Addr guest_IP, VexArch guest_arch, const VexArchInfo* archinfo, const VexAbiInfo* abiinfo, - VexEndness host_endness, - Bool sigill_diag ); + VexEndness host_endness_IN, + Bool sigill_diag_IN ); /* Used by the optimiser to specialise calls to helpers. */ extern @@ -108,7 +108,7 @@ extern ULong amd64g_calculate_RCL ( ULong arg, ULong rot_amt, ULong rflags_in, Long sz ); -extern ULong amd64g_calculate_pclmul(ULong s1, ULong s2, ULong which); +extern ULong amd64g_calculate_pclmul(ULong a, ULong b, ULong which); extern ULong amd64g_check_fldcw ( ULong fpucw ); diff --git a/coregrind/m_syswrap/syswrap-amd64-freebsd.c b/coregrind/m_syswrap/syswrap-amd64-freebsd.c index a58698532..e1316eac3 100644 --- a/coregrind/m_syswrap/syswrap-amd64-freebsd.c +++ b/coregrind/m_syswrap/syswrap-amd64-freebsd.c @@ -643,7 +643,7 @@ PRE(sys_thr_new) goto fail; } tp.stack_base = (void *)ctst->os_state.valgrind_stack_base; - tp.stack_size = (Addr)stk - (Addr)tp.stack_base; + tp.stack_size = stk - (Addr)tp.stack_base; /* Create the new thread */ res = VG_(do_syscall2)(__NR_thr_new, (UWord)&tp, sizeof(tp)); diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 6058bbe83..ea0ca2bfe 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -384,7 +384,7 @@ void VG_(main_thread_wrapper_NORETURN)(ThreadId tid) vg_assert( VG_(count_living_threads)() == 1 ); ML_(call_on_new_stack_0_1)( - (Addr)sp, /* stack */ + sp, /* stack */ 0, /* bogus return address */ run_a_thread_NORETURN, /* fn to call */ (Word)tid /* arg to give it */ @@ -4616,13 +4616,9 @@ POST(sys__umtx_op) ML_(record_fd_open_nameless) (tid, RES); } break; - case VKI_UMTX_OP_ROBUST_LISTS: - break; case VKI_UMTX_OP_GET_MIN_TIMEOUT: POST_MEM_WRITE( ARG4, sizeof(long int) ); break; - case VKI_UMTX_OP_SET_MIN_TIMEOUT: - break; default: break; } diff --git a/include/pub_tool_oset.h b/include/pub_tool_oset.h index bbd3e0888..346539612 100644 --- a/include/pub_tool_oset.h +++ b/include/pub_tool_oset.h @@ -98,7 +98,7 @@ typedef Word (*OSetCmp_t) ( const void* key, const void* elem ); extern OSet* VG_(OSetWord_Create) ( Alloc_Fn_t alloc_fn, const HChar* cc, Free_Fn_t free_fn ); -extern void VG_(OSetWord_Destroy) ( OSet* os ); +extern void VG_(OSetWord_Destroy) ( OSet* t ); /*--------------------------------------------------------------------*/ /*--- Operations on OSets (UWord) ---*/ @@ -140,12 +140,12 @@ extern void VG_(OSetWord_Destroy) ( OSet* os ); // they will return False if VG_(OSetWord_Next)() is called without an // intervening call to VG_(OSetWord_ResetIter)(). -extern Word VG_(OSetWord_Size) ( const OSet* os ); +extern Word VG_(OSetWord_Size) ( const OSet* t ); extern void VG_(OSetWord_Insert) ( OSet* os, UWord val ); extern Bool VG_(OSetWord_Contains) ( const OSet* os, UWord val ); extern Bool VG_(OSetWord_Remove) ( OSet* os, UWord val ); extern void VG_(OSetWord_ResetIter) ( OSet* os ); -extern Bool VG_(OSetWord_Next) ( OSet* os, /*OUT*/UWord* val ); +extern Bool VG_(OSetWord_Next) ( OSet* t, /*OUT*/UWord* val ); /*--------------------------------------------------------------------*/