Browse Source

* Fix compiler hints

Michaël Van Canneyt 3 years ago
parent
commit
8a63e7ee5a

+ 1 - 1
packages/fcl-web/src/restbridge/sqldbrestcds.pp

@@ -86,7 +86,7 @@ Type
   { TBufDatasetInputStreamer }
 
   TBufDatasetInputStreamer = Class(TCDSInputStreamer)
-  Protected
+  Public
     Class Function ForBufDataset: Boolean; override;
   end;
 

+ 10 - 8
packages/fcl-web/src/restbridge/sqldbrestdata.pp

@@ -129,6 +129,8 @@ begin
     roPut : DoHandlePut;
     roPost : DoHandlePost;
     roDelete : DoHandleDelete;
+  else
+    ;
   end;
 end;
 
@@ -402,22 +404,22 @@ begin
       rftInteger : P.AsInteger:=D.AsInteger;
       rftLargeInt : P.AsLargeInt:=D.AsInt64;
       rftFloat : P.AsFloat:=D.AsFloat;
-      rftDate : P.AsDateTime:=ScanDateTime(GetString(rpDateFormat),D.AsString);
-      rftTime : P.AsDateTime:=ScanDateTime(GetString(rpTimeFormat),D.AsString);
-      rftDateTime : P.AsDateTime:=ScanDateTime(GetString(rpDateTimeFormat),D.AsString);
-      rftString : P.AsString:=D.AsString;
+      rftDate : P.AsDateTime:=ScanDateTime(GetString(rpDateFormat),S);
+      rftTime : P.AsDateTime:=ScanDateTime(GetString(rpTimeFormat),S);
+      rftDateTime : P.AsDateTime:=ScanDateTime(GetString(rpDateTimeFormat),S);
+      rftString : P.AsString:=S;
       rftBoolean : P.AsBoolean:=D.AsBoolean;
       rftBlob :
 {$IFNDEF VER3_0}
-         P.AsBlob:=BytesOf(DecodeStringBase64(D.AsString));
+         P.AsBlob:=BytesOf(DecodeStringBase64(S));
 {$ELSE}
-         P.AsBlob:=DecodeStringBase64(D.AsString);
+         P.AsBlob:=DecodeStringBase64(S);
 {$ENDIF}
     else
-      P.AsString:=D.AsString;
+      P.AsString:=S;
     end
   else
-    P.AsString:=D.AsString;
+    P.AsString:=S;
 end;
 
 function TSQLDBRestDBHandler.FindFieldForParam(aOperation: TRestOperation;

+ 2 - 0
packages/fcl-web/src/restbridge/sqldbrestio.pp

@@ -848,6 +848,8 @@ begin
     rftString : Result:=F.AsString;
     rftBoolean : Result:=BoolToStr(F.AsBoolean,'true','false');
     rftBlob : Result:=FieldToBase64(F);
+  else
+    Result:='';
   end;
 end;
 

+ 4 - 0
packages/fcl-web/src/restbridge/sqldbrestjson.pp

@@ -178,6 +178,8 @@ begin
       rftString : Result:=TJSONString.Create(F.AsString);
       rftBoolean : Result:=TJSONBoolean.Create(F.AsBoolean);
       rftBlob : Result:=TJSONString.Create(FieldToBase64(F));
+    else
+      Result:=Nil;
     end;
 end;
 
@@ -220,6 +222,8 @@ begin
       rftTime : F.Add(GetString(rpFieldDateFormatProp),GetString(rpTimeFormat));
       rftDateTime : F.Add(GetString(rpFieldDateFormatProp),GetString(rpDateTimeFormat));
       rftString : F.Add(GetString(rpFieldMaxLenProp),P.DBField.Size);
+    else
+      ;
     end;
     end;
 end;

+ 2 - 0
packages/fcl-web/src/restbridge/sqldbrestxml.pp

@@ -288,6 +288,8 @@ begin
       rftTime : F[UTF8Decode(GetString(rpFieldDateFormatProp))]:=UTF8Decode(GetString(rpTimeFormat));
       rftDateTime : F[UTF8Decode(GetString(rpFieldDateFormatProp))]:=UTF8Decode(GetString(rpDateTimeFormat));
       rftString : F[UTF8Decode(GetString(rpFieldMaxLenProp))]:=UTF8Decode(IntToStr(P.DBField.Size));
+    else
+       ;
     end;
     end;
 end;