From 2d15895248bcfca72c3e3cc85194fd586e6eb921 Mon Sep 17 00:00:00 2001 From: Anton Alisov Date: Fri, 5 Sep 2025 22:20:20 +0300 Subject: [PATCH] Prevent "Variable might not have been initialized" warning. Prevent "Variable 'size' might not have been initialized" warning. Prevent "Variable 'when' might not have been initialized" warning. --- src/GpStuff.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/GpStuff.pas b/src/GpStuff.pas index a8551d23..db3e8b9f 100644 --- a/src/GpStuff.pas +++ b/src/GpStuff.pas @@ -2705,6 +2705,9 @@ procedure SetDataBreakpoint(idx: TDataBreakpointIndex; address: pointer; cndWritten : when := 1; cndReadOrWritten: when := 3; cndExecuted : when := 0; + else + when := 0; + Assert(False); end; ctx.Dr7 := ctx.Dr7 AND NOT (3 SHL 8) OR (1 SHL 8); ctx.Dr7 := ctx.Dr7 AND NOT (3 SHL (16 + (idx - 1) * 4)) OR (when SHL (16 + (idx - 1) * 4)); @@ -2713,6 +2716,9 @@ procedure SetDataBreakpoint(idx: TDataBreakpointIndex; address: pointer; sz2B: size := 1; sz4B: size := 3; sz8B: size := 2; + else + size := 0; + Assert(False); end; ctx.Dr7 := ctx.Dr7 AND NOT (3 SHL (16 + (idx - 1) * 4 + 2)) OR (size SHL (16 + (idx - 1) * 4 + 2)); if idx = 1 then ctx.Dr0 := NativeUInt(address) @@ -3510,3 +3516,4 @@ initialization GDisableDebugBreak := false; end. +