Browse Source

* Fix some warnings/hints

git-svn-id: trunk@42898 -
michael 6 years ago
parent
commit
7bd7db1b6c
2 changed files with 5 additions and 3 deletions
  1. 3 2
      packages/fcl-base/src/csvreadwrite.pp
  2. 2 1
      packages/fcl-base/src/maskutils.pp

+ 3 - 2
packages/fcl-base/src/csvreadwrite.pp

@@ -124,7 +124,7 @@ Type
     // simple parsing
     procedure ParseValue;
   public
-    constructor Create;
+    constructor Create; override;
     destructor Destroy; override;
     // Source data stream
     procedure SetSource(AStream: TStream); overload;
@@ -161,7 +161,7 @@ Type
     procedure AppendStringToStream(const AString: String; AStream: TStream);
     function  QuoteCSVString(const AValue: String): String;
   public
-    constructor Create;
+    constructor Create; override;
     destructor Destroy; override;
     // Set output/destination stream.
     // If not called, output is sent to DefaultOutput
@@ -455,6 +455,7 @@ var
   b: packed array[0..2] of byte;
   n: Integer;
 begin
+  B[0]:=0; B[1]:=0; B[2]:=0;
   ClearOutput;
   FSourceStream.Seek(0, soFromBeginning);
   if FDetectBOM then

+ 2 - 1
packages/fcl-base/src/maskutils.pp

@@ -308,7 +308,6 @@ end;
 // Clear (virtually) a single char in position Position
 function TMaskUtils.ClearChar(Position: Integer): Char;
 begin
-  Result := FMask[Position];
   //For Delphi compatibilty, only literals remain, all others will be blanked
   case CharToMask(FMask[Position]) Of
     Char_Number,
@@ -334,6 +333,8 @@ begin
     Char_AllFixedDownCase: Result := FSpaceChar;
     Char_HourSeparator: Result := DefaultFormatSettings.TimeSeparator;
     Char_DateSeparator: Result := DefaultFormatSettings.DateSeparator;
+  else
+    Result := FMask[Position];
   end;
 end;