diff --git a/components/freetype/ttgload.pas b/components/freetype/ttgload.pas index f61e40d98b..b04883ee1c 100644 --- a/components/freetype/ttgload.pas +++ b/components/freetype/ttgload.pas @@ -204,11 +204,11 @@ const np := source.n_points; nc := source.n_contours; - target.org := @source.org^[np]; - target.cur := @source.cur^[np]; - target.flags := @source.flags^[np]; + target.org := pointer(@source.org^[np]); + target.cur := pointer(@source.cur^[np]); + target.flags := pointer(@source.flags^[np]); - target.conEnds := @source.conEnds^[nc]; + target.conEnds := pointer(@source.conEnds^[nc]); target.n_points := 0; target.n_contours := 0; diff --git a/components/lazcontrols/extendednotebook.pas b/components/lazcontrols/extendednotebook.pas index 34ffd670ee..34f8461bf8 100644 --- a/components/lazcontrols/extendednotebook.pas +++ b/components/lazcontrols/extendednotebook.pas @@ -362,7 +362,7 @@ var Points[2].X := ARect.Left + 2; Points[2].y := y; Points[3] := Points[0]; - Polygon(DC, @Points, 4, False); + Polygon(DC, @Points[Low(Points)], 4, False); end; procedure DrawRightArrow(ARect: TRect); var y, h: Integer; @@ -377,7 +377,7 @@ var Points[2].X := ARect.Right - 2; Points[2].y := y; Points[3] := Points[0]; - Polygon(DC, @Points, 4, False); + Polygon(DC, @Points[Low(Points)], 4, False); end; procedure DrawTopArrow(ARect: TRect); var x, h: Integer; @@ -392,7 +392,7 @@ var Points[2].Y := ARect.Top + 2; Points[2].X := x; Points[3] := Points[0]; - Polygon(DC, @Points, 4, False); + Polygon(DC, @Points[Low(Points)], 4, False); end; procedure DrawBottomArrow(ARect: TRect); var x, h: Integer; @@ -407,7 +407,7 @@ var Points[2].Y := ARect.Bottom - 2; Points[2].X := X; Points[3] := Points[0]; - Polygon(DC, @Points, 4, False); + Polygon(DC, @Points[Low(Points)], 4, False); end; begin diff --git a/components/lazutils/laz2_xmlutils.pas b/components/lazutils/laz2_xmlutils.pas index ba173f9ac6..3e4b5f3e62 100644 --- a/components/lazutils/laz2_xmlutils.pas +++ b/components/lazutils/laz2_xmlutils.pas @@ -218,7 +218,7 @@ begin if Xml11 then Pages := Xml11NamePages else - Pages := @NamePages; + Pages := pointer(@NamePages); I := 0; if (Len = 0) or not ((Byte(Value[I]) in NamingBitmap[Pages^[hi(Word(Value[I]))]]) or @@ -246,7 +246,7 @@ begin if Xml11 then Pages := Xml11NamePages else - Pages := @NamePages; + Pages := pointer(@NamePages); Result := False; if Value = '' then Exit; @@ -278,7 +278,7 @@ begin if Xml11 then Pages := Xml11NamePages else - Pages := @NamePages; + Pages := pointer(@NamePages); Result := False; if Value = '' then Exit; @@ -302,7 +302,7 @@ begin if Xml11 then Pages := Xml11NamePages else - Pages := @NamePages; + Pages := pointer(@NamePages); I := 1; Result := False; if Value = '' then diff --git a/lcl/include/imglist.inc b/lcl/include/imglist.inc index 717aa8e618..cffa7af0b7 100644 --- a/lcl/include/imglist.inc +++ b/lcl/include/imglist.inc @@ -599,7 +599,7 @@ begin if Index >= 0 then begin Image.DataSize := FWidth * FHeight * SizeOf(FData[0]); - Image.Data := @FData[Index * FWidth * FHeight]; + Image.Data := pointer(@FData[Index * FWidth * FHeight]); end; end; diff --git a/lcl/interfaces/win32/win32proc.pp b/lcl/interfaces/win32/win32proc.pp index 459ff878b1..9640456cdb 100644 --- a/lcl/interfaces/win32/win32proc.pp +++ b/lcl/interfaces/win32/win32proc.pp @@ -1384,7 +1384,7 @@ begin tmp := nil; r := Windows.FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_ARGUMENT_ARRAY, - nil, AErrorCode, LANG_NEUTRAL, @tmp, 0, nil); + nil, AErrorCode, LANG_NEUTRAL, pointer(@tmp), 0, nil); if r = 0 then Exit(''); @@ -1610,7 +1610,7 @@ function WndClassName(Wnd: HWND): String; inline; var winClassName: array[0..19] of char; begin - GetClassName(Wnd, @winClassName, 20); + GetClassName(Wnd, @winClassName[low(winClassName)], Length(winClassName)); Result := winClassName; end; @@ -1618,7 +1618,7 @@ function WndText(Wnd: HWND): String; inline; var winText: array[0..255] of char; begin - GetWindowText(Wnd, @winText, 256); + GetWindowText(Wnd, @winText[low(winText)], Length(winText)); Result := winText; end;