@@ -116,8 +116,8 @@ ur_result_t MsanShadowMemoryCPU::EnqueuePoisonShadow(
116116 const ur_event_handle_t *EventWaitList, ur_event_handle_t *OutEvent) {
117117
118118 if (Size) {
119- uptr ShadowBegin = MemToShadow (Ptr);
120- uptr ShadowEnd = MemToShadow (Ptr + Size - 1 );
119+ const uptr ShadowBegin = MemToShadow (Ptr);
120+ const uptr ShadowEnd = MemToShadow (Ptr + Size - 1 );
121121 assert (ShadowBegin <= ShadowEnd);
122122 getContext ()->logger .debug (
123123 " EnqueuePoisonShadow(addr={}, count={}, value={})" ,
@@ -145,12 +145,12 @@ ur_result_t MsanShadowMemoryCPU::EnqueueCopyShadow(
145145 return UR_RESULT_SUCCESS;
146146 }
147147
148- uptr SrcShadowBegin = MemToShadow (Src);
149- uptr SrcShadowEnd = MemToShadow (Src + Size - 1 );
148+ const uptr SrcShadowBegin = MemToShadow (Src);
149+ const uptr SrcShadowEnd = MemToShadow (Src + Size - 1 );
150150 assert (SrcShadowBegin <= SrcShadowEnd);
151151
152- uptr DstShadowBegin = MemToShadow (Dst);
153- uptr DstShadowEnd = MemToShadow (Dst + Size - 1 );
152+ const uptr DstShadowBegin = MemToShadow (Dst);
153+ const uptr DstShadowEnd = MemToShadow (Dst + Size - 1 );
154154 assert (DstShadowBegin <= DstShadowEnd);
155155
156156 assert (SrcShadowEnd - SrcShadowBegin == DstShadowEnd - DstShadowBegin);
0 commit comments