diff --git a/src/fn_call.rs b/src/fn_call.rs index 11b0ae345c7f..b475837a6e52 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -634,14 +634,16 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, ' let ptr_size = self.memory.pointer_size(); self.write_scalar(dest, Scalar::from_int(1, ptr_size), dest_ty)?; }, - "GetModuleHandleW" | - "GetProcAddress" | "InitializeCriticalSection" | "EnterCriticalSection" | - "TryEnterCriticalSection" | "LeaveCriticalSection" | "DeleteCriticalSection" | "SetLastError" => { + // Function does not return anything, nothing to do + }, + "GetModuleHandleW" | + "GetProcAddress" | + "TryEnterCriticalSection" => { // pretend these do not exist/nothing happened, by returning zero let ptr_size = self.memory.pointer_size(); self.write_scalar(dest, Scalar::from_int(0, ptr_size), dest_ty)?;