From e50f9bb7d22a34512e9220ff2cba93b9b51bdbed Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 29 May 2006 10:01:27 +0000 Subject: [PATCH] Merged revisions 3733 via svnmerge from svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk ........ r3733 | jonas | 2006-05-29 11:54:42 +0200 (Mon, 29 May 2006) | 3 lines * fixed web bug tw4954 (warning when reading from a typed file) + test for the above (submitted test program minus childish remarks) ........ git-svn-id: branches/fixes_2_0@3734 - --- .gitattributes | 1 + rtl/inc/compproc.inc | 2 +- rtl/inc/typefile.inc | 2 +- tests/webtbs/tw4954.pp | 26 ++++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 tests/webtbs/tw4954.pp diff --git a/.gitattributes b/.gitattributes index eb7be1fc23..cf0d06a35b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6484,6 +6484,7 @@ tests/webtbs/tw4902.pp -text tests/webtbs/tw4922.pp svneol=native#text/plain tests/webtbs/tw4925.pp svneol=native#text/plain tests/webtbs/tw4950.pp svneol=native#text/plain +tests/webtbs/tw4954.pp svneol=native#text/plain tests/webtbs/tw4999.pp svneol=native#text/plain tests/webtbs/tw5036.pp svneol=native#text/plain tests/webtbs/tw5082.pp -text svneol=unset#text/plain diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc index 2c894cc0a1..e6a8fa8574 100644 --- a/rtl/inc/compproc.inc +++ b/rtl/inc/compproc.inc @@ -321,7 +321,7 @@ procedure fpc_assert(Const Msg,FName:Shortstring;LineNo:Longint;ErrorAddr:Pointe Procedure fpc_reset_typed(var f : TypedFile;Size : Longint); compilerproc; Procedure fpc_rewrite_typed(var f : TypedFile;Size : Longint); compilerproc; Procedure fpc_typed_write(TypeSize : Longint;var f : TypedFile;const Buf); compilerproc; -Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf); compilerproc; +Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;out Buf); compilerproc; {$ifdef FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE} function fpc_int64_to_double(i: int64): double; compilerproc; diff --git a/rtl/inc/typefile.inc b/rtl/inc/typefile.inc index 7cb2efcd4c..7ecd347f17 100644 --- a/rtl/inc/typefile.inc +++ b/rtl/inc/typefile.inc @@ -73,7 +73,7 @@ Begin end; End; -Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf);[IOCheck, Public, Alias :'FPC_TYPED_READ']; compilerproc; +Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;out Buf);[IOCheck, Public, Alias :'FPC_TYPED_READ']; compilerproc; var Result : Longint; Begin diff --git a/tests/webtbs/tw4954.pp b/tests/webtbs/tw4954.pp new file mode 100644 index 0000000000..eb361ceba4 --- /dev/null +++ b/tests/webtbs/tw4954.pp @@ -0,0 +1,26 @@ +{ %OPT=-Seh } + +program aFP211r; { false hints on varrec } + + type + t = record + d:integer + end; + + var + f: file of t; + + procedure P1; + var + varrec : t ; + begin + READ( f , varrec ) + end{ P1 }; + +begin + assign( f , 'fname'); + reset(f); + P1; +end. + +