Link to home
Start Free TrialLog in
Avatar of Rodbach
RodbachFlag for Afghanistan

asked on

Can't turn off [DCC Warning]

I have inherited an application which had over 3,000 Hints and Warnings. I have successfully eliminated the majority off these but don't want to touch 3rd party component source code and for these I have been using the {$WARNINGS OFF} compiler directive.

However this won't turn off [DCC Warning] warnings. I have one warning that I don't seem to be able to eliminate and that is

[DCC Warning] JwaWinInet.pas(6390): W1011 Text after final 'END.' - ignored by compiler

which is caused by

{$IFNDEF JWA_OMIT_SECTIONS}
end.
{$ENDIF JWA_OMIT_SECTIONS}

Has anyone any suggestions as to how I can either turn off this warning or change the code to stop it occurring?
SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
including another unit
... with uses unitX, unitY

does not end the current unit
no matter what compiler directives you put in

you'll need to give me some prove to convince me otherwise
forget the proof, i found the file > part of the jedi project

how odd can unit programming get when even the header is encompassed with compiler directives
{$IFNDEF JWA_OMIT_SECTIONS}
unit JwaWinInet;
{$ENDIF JWA_OMIT_SECTIONS}

Open in new window


if you actually exclude only 3 compiler directives
the complete unit would give this:
// Some comments
#include "wininet.h"

Open in new window


Way to go Jedi !
Avatar of Rodbach

ASKER

Deleting the compiler directives around the final end caused some problems as the end was only required depending on which compiler directives were ON. So my solution worked better in these circumstances.