View Full Version : Incorrect "Unused Function", no debug

01-06-2002, 03:53 PM
I have a function I've added. It is in setup.rul, and one of my components has this function specified in its "OnInstalled" property.

When compiled, I get the message "function defined but never called". As this was a warning only, I felt I could ignore it, but apparently there are several side effects of this that are not documented.

It appeared the function was not being called, so I ran with debugging. I can set no breakpoints within that function, although I can set them elsewhere.

As far as I can tell, IS6 doesn't actually link the function in at all, and I can find no documentation on linker options that might force it to be linked in.

This seems to be an error -- a reference from an event property ought to be valid as a reference. Otherwise, I have to add a compltely bogus and otherwise-unneccessary reference to my function from one of the "established" event functions -- which also have "no reference" within the code, but are obviously specially treated by the compiler and/or linker.

Is there some way to do this correctly, so that the function is compiled and linked? Also I think the "Warning" status is inappropriate -- this should be an ERROR as it materially affects the actual compiled application. Warnings should have an obvious default behavior, which this does not.