mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 05:38:25 +02:00
* fixed several warnings and notes about unused variables (mainly) or
uninitialised use of variables/function results (a few)
This commit is contained in:
parent
3f9d6ab32f
commit
2426ecafc3
@ -85,9 +85,6 @@ var
|
||||
execpathstr : shortstring;
|
||||
|
||||
function paramstr(l: longint) : string;
|
||||
var
|
||||
s: string;
|
||||
s1: string;
|
||||
begin
|
||||
{ stricly conforming POSIX applications }
|
||||
{ have the executing filename as argv[0] }
|
||||
@ -268,7 +265,11 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.25 2005-02-14 17:13:21 peter
|
||||
Revision 1.26 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.25 2005/02/14 17:13:21 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.24 2005/02/13 21:47:56 peter
|
||||
|
@ -1853,13 +1853,13 @@ end;
|
||||
function KEYCHAR(c:longint):longint;
|
||||
|
||||
begin
|
||||
c:=c and $FF;
|
||||
keychar:=c and $FF;
|
||||
end;
|
||||
|
||||
function KEYFLAGS(c:longint):longint;
|
||||
|
||||
begin
|
||||
c:=c and NOT $FF;
|
||||
keyflags:=c and NOT $FF;
|
||||
end;
|
||||
|
||||
function kbio_F(x:longint):longint;
|
||||
|
@ -125,7 +125,6 @@ end;
|
||||
function ThreadFunc(parameter: Pointer): LongInt;
|
||||
var
|
||||
LThread: TThread;
|
||||
c: char;
|
||||
begin
|
||||
WRITE_DEBUG('ThreadFunc is here...');
|
||||
LThread := TThread(parameter);
|
||||
@ -287,7 +286,11 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2005-03-01 20:38:49 jonas
|
||||
Revision 1.7 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.6 2005/03/01 20:38:49 jonas
|
||||
* fixed web bug 3387: if one called resume right after creating a
|
||||
suspended thread, it was possible that resume was executed before
|
||||
that thread had completed its initialisation in BeginThread ->
|
||||
|
@ -48,7 +48,6 @@ Function AssignPipe(var pipe_in,pipe_out:cint):cint; [public, alias : 'FPC_SYSC_
|
||||
}
|
||||
var
|
||||
ret : longint;
|
||||
errn : cint;
|
||||
fdis : array[0..1] of cint;
|
||||
begin
|
||||
fdis[0]:=pipe_in;
|
||||
@ -62,7 +61,11 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2005-02-14 17:13:22 peter
|
||||
Revision 1.3 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.2 2005/02/14 17:13:22 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.1 2005/02/13 21:47:56 peter
|
||||
|
@ -962,7 +962,7 @@ end;
|
||||
|
||||
function SysGetMem_Var(size: ptrint): pointer;
|
||||
var
|
||||
pcurr, pcurr_tmp : pmemchunk_var;
|
||||
pcurr : pmemchunk_var;
|
||||
{$ifdef BESTMATCH}
|
||||
pbest : pmemchunk_var;
|
||||
{$endif}
|
||||
@ -1201,9 +1201,7 @@ function SysTryResizeMem(var p: pointer; size: ptrint): boolean;
|
||||
var
|
||||
pcurrsize,
|
||||
oldsize,
|
||||
currsize,
|
||||
sizeleft : ptrint;
|
||||
pnew,
|
||||
currsize : ptrint;
|
||||
pcurr : pmemchunk_var;
|
||||
begin
|
||||
{ fix p to point to the heaprecord }
|
||||
@ -1354,7 +1352,11 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.49 2005-03-21 16:31:33 peter
|
||||
Revision 1.50 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.49 2005/03/21 16:31:33 peter
|
||||
* fix crash under win32 with previous reallocmem fix
|
||||
|
||||
Revision 1.48 2005/03/20 18:57:29 peter
|
||||
|
@ -742,8 +742,10 @@ procedure CheckPointer(p : pointer);{$ifndef NOSAVEREGISTERS}saveregisters;{$end
|
||||
var
|
||||
i : ptrint;
|
||||
pp : pheap_mem_info;
|
||||
{$ifdef go32v2}
|
||||
get_ebp,stack_top : longword;
|
||||
data_end : longword;
|
||||
{$endif go32v2}
|
||||
label
|
||||
_exit;
|
||||
begin
|
||||
@ -1193,7 +1195,11 @@ finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.42 2005-03-10 20:36:31 florian
|
||||
Revision 1.43 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.42 2005/03/10 20:36:31 florian
|
||||
* fixed pointer checking for win32, thx to Martin Schreiber for the patch
|
||||
|
||||
Revision 1.41 2005/03/04 16:49:34 peter
|
||||
|
@ -321,8 +321,6 @@ const digittab : shortstring = ('0123456789ABCDEF');
|
||||
|
||||
function lclinttohex (i:integer;digits:longint): ansistring;
|
||||
|
||||
var j,k : integer;
|
||||
|
||||
begin
|
||||
SetLength(lclinttohex,4);
|
||||
lclinttohex[4]:=digittab[1+(i and 15)];
|
||||
@ -402,7 +400,11 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.17 2005-03-18 10:04:31 marco
|
||||
Revision 1.18 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.17 2005/03/18 10:04:31 marco
|
||||
* cosmetic fix in netaddrtostr
|
||||
|
||||
Revision 1.16 2005/02/14 17:13:26 peter
|
||||
|
@ -836,7 +836,6 @@ function ArrayStringToPPchar(const S:Array of AnsiString;reserveentries:Longint)
|
||||
// if "s" goes out of scope in the parent procedure, the pointer is dangling.
|
||||
|
||||
var p : ppchar;
|
||||
Res,
|
||||
i : LongInt;
|
||||
begin
|
||||
if High(s)<Low(s) Then Exit(NIL);
|
||||
@ -871,12 +870,10 @@ var
|
||||
i,nr : longint;
|
||||
Buf : ^char;
|
||||
p : ppchar;
|
||||
InQuote : Boolean;
|
||||
|
||||
begin
|
||||
buf:=s;
|
||||
nr:=1;
|
||||
InQuote:=false;
|
||||
while (buf^<>#0) do // count nr of args
|
||||
begin
|
||||
while (buf^ in [' ',#9,#10]) do // Kill separators.
|
||||
@ -1051,7 +1048,11 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.77 2005-02-14 17:13:29 peter
|
||||
Revision 1.78 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.77 2005/02/14 17:13:29 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.76 2005/02/08 20:25:28 florian
|
||||
|
@ -1435,7 +1435,7 @@ end;
|
||||
|
||||
Function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64): TDateTime;
|
||||
begin
|
||||
Result:=Result+ANumberOfMinutes / MinsPerDay;
|
||||
Result:=AValue+ANumberOfMinutes / MinsPerDay;
|
||||
end;
|
||||
|
||||
|
||||
@ -1637,7 +1637,7 @@ Procedure DecodeDateMonthWeek(const AValue: TDateTime; var AYear, AMonth, AWeekO
|
||||
|
||||
Var
|
||||
D,SDOM,EDOM : Word;
|
||||
SOM,EOM : TdateTime;
|
||||
SOM : TdateTime;
|
||||
DOM : Integer;
|
||||
begin
|
||||
DecodeDate(AValue,AYear,AMonth,D);
|
||||
@ -2022,7 +2022,11 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 2005-02-14 17:13:31 peter
|
||||
Revision 1.12 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.11 2005/02/14 17:13:31 peter
|
||||
* truncate log
|
||||
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ end;
|
||||
|
||||
Function ReverseString(const AText: string): string;
|
||||
|
||||
var c: char;
|
||||
var
|
||||
i,j:longint;
|
||||
|
||||
begin
|
||||
@ -1679,7 +1679,11 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.14 2005-02-14 17:13:31 peter
|
||||
Revision 1.15 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.14 2005/02/14 17:13:31 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.13 2005/02/03 21:38:17 marco
|
||||
|
@ -582,6 +582,7 @@ var
|
||||
P := P + 1;
|
||||
end ;
|
||||
token:=#255;
|
||||
lastformattoken:=' ';
|
||||
while FormatCurrent < FormatEnd do
|
||||
begin
|
||||
Token := UpCase(FormatCurrent^);
|
||||
@ -754,7 +755,11 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 2005-03-17 15:21:10 marco
|
||||
Revision 1.9 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.8 2005/03/17 15:21:10 marco
|
||||
* fixed incmonths default param. Thnks nldelphi
|
||||
|
||||
Revision 1.7 2005/03/10 19:48:27 florian
|
||||
|
@ -119,8 +119,10 @@ var Code: word;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{$ifdef INWIDEFORMAT}
|
||||
var
|
||||
FormatChar : TFormatChar;
|
||||
{$endif INWIDEFORMAT}
|
||||
|
||||
begin
|
||||
{$ifdef fmtdebug}
|
||||
|
@ -566,7 +566,8 @@ end ;
|
||||
|
||||
|
||||
function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string;
|
||||
var i: integer; P, Q,R: PChar;
|
||||
var
|
||||
P,Q,R: PChar;
|
||||
begin
|
||||
P := Src;
|
||||
Q := StrEnd(P);
|
||||
@ -577,7 +578,6 @@ begin
|
||||
|
||||
setlength(result,(Q-P)+1);
|
||||
R:=@Result[1];
|
||||
i := 0;
|
||||
while P <> Q do
|
||||
begin
|
||||
R^:=P^;
|
||||
@ -956,8 +956,6 @@ Function TextToFloat(Buffer: PChar; Var Value; ValueType: TFloatValue): Boolean;
|
||||
Var
|
||||
E,P : Integer;
|
||||
S : String;
|
||||
C : Currency;
|
||||
Ext : Extended;
|
||||
|
||||
Begin
|
||||
S:=StrPas(Buffer);
|
||||
@ -1786,7 +1784,6 @@ End;
|
||||
Function FormatFloat(Const format: String; Value: Extended): String;
|
||||
|
||||
Var
|
||||
Temp: ShortString;
|
||||
buf : Array[0..1024] of char;
|
||||
|
||||
Begin
|
||||
@ -2097,7 +2094,11 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.34 2005-03-13 14:30:24 marco
|
||||
Revision 1.35 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.34 2005/03/13 14:30:24 marco
|
||||
* some 1.0.x fixes
|
||||
|
||||
Revision 1.33 2005/03/12 14:56:22 florian
|
||||
|
@ -237,7 +237,6 @@ end;
|
||||
Function FileAge (Const FileName : String): Longint;
|
||||
|
||||
Var Info : Stat;
|
||||
Y,M,D,hh,mm,ss : word;
|
||||
|
||||
begin
|
||||
If fpstat (FileName,Info)<0 then
|
||||
@ -893,7 +892,6 @@ end;
|
||||
function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString):integer;
|
||||
var
|
||||
pid : longint;
|
||||
err : longint;
|
||||
e : EOSError;
|
||||
CommandLine: AnsiString;
|
||||
cmdline2 : ppchar;
|
||||
@ -960,7 +958,6 @@ function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array Of AnsiStri
|
||||
|
||||
var
|
||||
pid : longint;
|
||||
err : longint;
|
||||
e : EOSError;
|
||||
|
||||
Begin
|
||||
@ -1106,7 +1103,11 @@ end.
|
||||
{
|
||||
|
||||
$Log$
|
||||
Revision 1.58 2005-02-26 14:38:14 florian
|
||||
Revision 1.59 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.58 2005/02/26 14:38:14 florian
|
||||
+ SysLocale
|
||||
|
||||
Revision 1.57 2005/02/14 17:13:31 peter
|
||||
|
@ -227,7 +227,8 @@ Function getenv(name:string):Pchar; external name 'FPC_SYSC_FPGETENV';
|
||||
|
||||
{ Most calls of WaitPID do not handle the result correctly, this funktion treats errors more correctly }
|
||||
Function WaitProcess(Pid:cint):cint; { like WaitPid(PID,@result,0) Handling of Signal interrupts (errno=EINTR), returning the Exitcode of Process (>=0) or -Status if terminated}
|
||||
var ret,r,s : cint;
|
||||
var
|
||||
r,s : cint;
|
||||
begin
|
||||
s:=$7F00;
|
||||
|
||||
@ -257,8 +258,6 @@ function intFpExecVEMaybeP (Const PathName:AnsiString;Args,MyEnv:ppchar;SearchPa
|
||||
Var
|
||||
NewCmd : ansistring;
|
||||
ThePath : AnsiString;
|
||||
Error : cint;
|
||||
NrParam : longint;
|
||||
|
||||
Begin
|
||||
If SearchPath and (pos('/',pathname)=0) Then
|
||||
@ -749,7 +748,9 @@ var
|
||||
pipo : text;
|
||||
pid : pid_t;
|
||||
pl : ^cint;
|
||||
{$ifndef FPC_USE_FPEXEC}
|
||||
pp : ppchar;
|
||||
{$endif not FPC_USE_FPEXEC}
|
||||
ret : cint;
|
||||
begin
|
||||
rw:=upcase(rw);
|
||||
@ -830,8 +831,10 @@ var
|
||||
pipo : file;
|
||||
pid : cint;
|
||||
pl : ^cint;
|
||||
{$ifndef FPC_USE_FPEXEC}
|
||||
p,pp : ppchar;
|
||||
temp : string[255];
|
||||
{$endif not FPC_USE_FPEXEC}
|
||||
ret : cint;
|
||||
begin
|
||||
rw:=upcase(rw);
|
||||
@ -1217,7 +1220,11 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.84 2005-02-14 17:13:31 peter
|
||||
Revision 1.85 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.84 2005/02/14 17:13:31 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.83 2005/02/13 21:47:56 peter
|
||||
|
@ -53,7 +53,6 @@ function ArrayStringToPPchar(const S:Array of AnsiString;reserveentries:Longint)
|
||||
// if "s" goes out of scope in the parent procedure, the pointer is dangling.
|
||||
|
||||
var p : ppchar;
|
||||
Res,
|
||||
i : LongInt;
|
||||
begin
|
||||
if High(s)<Low(s) Then Exit(NIL);
|
||||
@ -141,12 +140,10 @@ var
|
||||
i,nr : longint;
|
||||
Buf : ^char;
|
||||
p : ppchar;
|
||||
InQuote : Boolean;
|
||||
|
||||
begin
|
||||
buf:=s;
|
||||
nr:=1;
|
||||
InQuote:=false;
|
||||
while (buf^<>#0) do // count nr of args
|
||||
begin
|
||||
while (buf^ in [' ',#9,#10]) do // Kill separators.
|
||||
@ -410,7 +407,11 @@ End;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 2005-02-14 17:13:31 peter
|
||||
Revision 1.8 2005-03-25 22:53:39 jonas
|
||||
* fixed several warnings and notes about unused variables (mainly) or
|
||||
uninitialised use of variables/function results (a few)
|
||||
|
||||
Revision 1.7 2005/02/14 17:13:31 peter
|
||||
* truncate log
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user