Delphi XE2 Update2: DCC Warning in TeCanvas.pas
Posted: Wed Nov 23, 2011 11:20 am
Hello
When compiling the new version (2011.04.41118) in Win32-bit mode I get a warning in TeCanvas.pas
Could you remove this warning in the next release?
Best regards
Tom
It is on the line 'Assert(tmpRes,'Error transferring internal Bitmap using BitBlt');' in this code:
When compiling the new version (2011.04.41118) in Win32-bit mode I get a warning in TeCanvas.pas
Could you remove this warning in the next release?
Best regards
Tom
Code: Select all
[DCC Warning] VCLTee.TeCanvas.pas(7623): W1036 Variable 'tmpRes' might not have been initialized
Code: Select all
Procedure TTeeCanvas3D.TransferBitmap(ALeft,ATop:Integer; ACanvas:TCanvas);
{$IFNDEF FMX}
{$IFOPT C+}
var tmpRes : LongBool;
{$ENDIF}
{$ENDIF}
begin
{$IFNDEF CLX}
{$IFDEF MONITOR_REPAINTS}
Inc(TeeMonitor);
FBitmap.Canvas.TextOut(0,0,IntToStr(TeeMonitor));
{$ENDIF}
// Assert(FBitmap.PixelFormat=pfDevice,'Buffer Bitmap PixelFormat <> pfDevice');
{$IFDEF LCL}
ACanvas.Draw(ALeft, ATop, FBitmap);
{$ELSE}
{$IFDEF FMX}
{$ELSE}
if View3DOptions.Parent.Parent<>nil then
{$IFOPT C+}
tmpRes:=
{$ENDIF}
BitBlt( ACanvas.Handle,ALeft,ATop,
FBitmap.Width,
FBitmap.Height,
FBitmap.Canvas.Handle,0,0,SRCCOPY);
{$IFOPT C+}
{$IFNDEF TEEOCX}
Assert(tmpRes,'Error transferring internal Bitmap using BitBlt');
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ELSE}
QPainter_drawPixmap(ACanvas.Handle, ALeft, ATop, FBitmap.Handle, 0, 0,
FBitmap.Width, FBitmap.Height);
{$ENDIF}
end;