View Issue Details

IDProjectCategoryView StatusLast Update
0035467LazarusLCLpublic2020-04-02 14:56
ReporterSerge Anvarov Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWindows 
Summary0035467: TWindowProcHelper.CalcClipRgn micropatch
DescriptionReplace the uninitialized variable with the required variable. Delete the unused variable. Solve "ToDo".
TagsNo tags attached.
Fixed in Revisionr61086
LazTarget-
Widgetset
Attached Files

Relationships

has duplicate 0035491 resolvedMaxim Ganetsky uninitialized variable warning in win32callback.inc 

Activities

Serge Anvarov

2019-04-29 09:13

reporter  

TWindowProcHelper.CalcClipRgn.diff (846 bytes)   
Index: lcl/interfaces/win32/win32callback.inc
===================================================================
--- lcl/interfaces/win32/win32callback.inc	(revision 61078)
+++ lcl/interfaces/win32/win32callback.inc	(working copy)
@@ -493,7 +493,7 @@
 
 procedure TWindowProcHelper.CalcClipRgn(PaintRegion: HRGN);
 var
-  nSize, BytesCount: DWORD;
+  nSize: DWORD;
   RgnData: PRgnData;
   WindowOrg: Windows.POINT;
   XFRM: TXFORM;
@@ -527,8 +527,7 @@
     XFRM.eM11:=-1; XFRM.eM12:=0;
     XFRM.eM21:=0;  XFRM.eM22:=1;
 
-    // ToDo: BytesCount is not initialized.
-    MirroredPaintRgn := ExtCreateRegion(@XFRM, BytesCount, RgnData^);
+    MirroredPaintRgn := ExtCreateRegion(@XFRM, nSize, RgnData^);
     Windows.SelectClipRgn(CurDoubleBuffer.DC, MirroredPaintRgn);
     Windows.DeleteObject(MirroredPaintRgn);
     Freemem(RgnData);

Juha Manninen

2019-04-30 18:04

developer   ~0115927

Applied, thanks.

Serge Anvarov

2019-11-01 20:41

reporter   ~0118956

Still not hit the release

Juha Manninen

2020-04-02 14:56

developer   ~0121846

> Still not hit the release

It will hit the Lazarus 2.2 release which will be forked from trunk at some point.

Issue History

Date Modified Username Field Change
2019-04-29 09:13 Serge Anvarov New Issue
2019-04-29 09:13 Serge Anvarov File Added: TWindowProcHelper.CalcClipRgn.diff
2019-04-30 14:44 Juha Manninen Assigned To => Juha Manninen
2019-04-30 14:44 Juha Manninen Status new => assigned
2019-04-30 18:04 Juha Manninen Status assigned => resolved
2019-04-30 18:04 Juha Manninen Resolution open => fixed
2019-04-30 18:04 Juha Manninen Fixed in Revision => r61086
2019-04-30 18:04 Juha Manninen LazTarget => -
2019-04-30 18:04 Juha Manninen Note Added: 0115927
2019-10-27 23:00 Maxim Ganetsky Relationship added has duplicate 0035491
2019-11-01 20:41 Serge Anvarov Note Added: 0118956
2020-04-02 14:56 Juha Manninen Note Added: 0121846