+1

Suggestion [Wxxx] "Format parameters have wrong type"

Lübbe Onken 9 years ago 0

As followup to: http://fixinsight.userecho.com/topics/132-w513-false-positives-with-numbered-parameters/


Would it be possible for you to check the parameter types for compatibility? Because errors there will crash the applicaton at runtime. Taking into account numbered parameters of course :)


Something like:

var
  iError: integer;
  sError: string;
begin
  Format('Code %s [%d]', [sError, iError]);
  Format('Code %d [%d]', [iError, sError]); <-- Wxxx Parameter data type doesn't match placeholder
  Format('Code %s [%0:d]', [sError, iError]); <-- Wxxx Parameter data type doesn't match placeholder
end;