From 51a6c217c71ed2f41c0caa2871fb93ec1453c521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Sun, 28 Jun 2015 23:12:41 +0000 Subject: [PATCH] amicommon/dos: some warning fixes - use PtrInt instead of LongInt; do not check for less than zero values in unsigned variables git-svn-id: trunk@31173 - --- rtl/amicommon/dos.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtl/amicommon/dos.pp b/rtl/amicommon/dos.pp index 074c9fd955..0d39161554 100644 --- a/rtl/amicommon/dos.pp +++ b/rtl/amicommon/dos.pp @@ -109,7 +109,7 @@ begin dosLock:=Lock(buffer,accessmode); end; -function BADDR(bval: LongInt): Pointer; Inline; +function BADDR(bval: PtrInt): Pointer; Inline; begin {$if defined(AROS) and (not defined(AROS_FLAVOUR_BINCOMPAT))} BADDR := Pointer(bval); @@ -127,7 +127,7 @@ begin {$endif} end; -function BSTR2STRING(s : LongInt): PChar; Inline; +function BSTR2STRING(s : PtrInt): PChar; Inline; begin {$if defined(AROS) and (not defined(AROS_FLAVOUR_BINCOMPAT))} BSTR2STRING:=PChar(s); @@ -670,7 +670,7 @@ end; function DiskSize(Drive: Byte): Int64; begin DiskSize := -1; - if (Drive < 0) or (Drive >= NumDevices) then + if (Drive >= NumDevices) then Exit; DiskSize := DiskSize(DeviceList[Drive]); end; @@ -700,7 +700,7 @@ end; function DiskFree(Drive: Byte): Int64; begin DiskFree := -1; - if (Drive < 0) or (Drive >= NumDevices) then + if (Drive >= NumDevices) then Exit; DiskFree := DiskFree(DeviceList[Drive]); end;