• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

W1012 Constant expression violates subrange bounds

Started by Eko Indriyawan, September 22, 2010, 07:45:11 pm

Previous topic - Next topic

Eko Indriyawan

Hi Roman,

I have an issue about Warning Message of your component. This issue talking about "W1012 Constant expression violates subrange bounds".

Could you help me to fix this code, so I do not see this message in the future. Although this warning does not make the project error, but I don't want it always raise in my IDE and I don't want to hide it by setting the configuration or the warning message.

FYI, this issue caused by this code:

function GetSetupError(code: integer): string;
begin
Result := '#' + IntToHex(code, 8) + '.';
case code of
  ERROR_NO_SUCH_DEVINST:
    begin
    Result := Result + ' Device not found.';
    end;
  ERROR_NO_AUTHENTICODE_CATALOG, ERROR_AUTHENTICODE_DISALLOWED, ERROR_AUTHENTICODE_TRUSTED_PUBLISHER, ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED, ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED, ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH, ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE:
    begin
    Result := Result + ' Driver authentication error.';
    end;
end;
end;


I hope you can fix it as soon as possible.

Roman Novgorodov

Hello

The new nrComm Lib v9.11 is available. Please visit update center.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.