* Workaround dead code warnings by using preprocessor.

git-svn-id: trunk@9497 -
This commit is contained in:
yury 2007-12-21 21:49:47 +00:00
parent 8c54008d0c
commit 99ea98c7b1
2 changed files with 21 additions and 9 deletions

View File

@ -175,10 +175,12 @@ begin
if erroraddr = nil then
RunError(217)
else
if errorcode <= maxExitCode then
halt(errorcode)
else
{$ifdef FPC_LIMITED_EXITCODE}
if errorcode > maxExitCode then
halt(255)
else
{$endif FPC_LIMITED_EXITCODE}
halt(errorcode);
end;

View File

@ -12,6 +12,12 @@
**********************************************************************}
{$ifdef FPC_OBJFPC_EXTENDED_IF}
{$if High(errorcode)<>maxExitCode}
{$define FPC_LIMITED_EXITCODE}
{$endif}
{$endif FPC_OBJFPC_EXTENDED_IF}
{****************************************************************************
Local types
****************************************************************************}
@ -867,10 +873,12 @@ begin
{$endif FPC_HAS_FEATURE_EXCEPTIONS}
{$ifdef FPC_HAS_FEATURE_EXITCODE}
if errorcode <= maxExitCode then
halt(errorcode)
else
{$ifdef FPC_LIMITED_EXITCODE}
if errorcode > maxExitCode then
halt(255)
else
{$endif FPC_LIMITED_EXITCODE}
halt(errorcode);
{$else FPC_HAS_FEATURE_EXITCODE}
halt;
{$endif FPC_HAS_FEATURE_EXITCODE}
@ -903,10 +911,12 @@ begin
erroraddr:=get_caller_addr(get_frame);
errorbase:=get_caller_frame(get_frame);
{$ifdef FPC_HAS_FEATURE_EXITCODE}
if errorcode <= maxExitCode then
halt(errorcode)
else
{$ifdef FPC_LIMITED_EXITCODE}
if errorcode > maxExitCode then
halt(255)
else
{$endif FPC_LIMITED_EXITCODE}
halt(errorcode);
{$else FPC_HAS_FEATURE_EXITCODE}
halt;
{$endif FPC_HAS_FEATURE_EXITCODE}