Inform6: Suppress warnings

Hello all!

I have some functions that I’m still tweaking so sometimes I compile with them being used and sometimes not. When I’m not using them, I get warnings about them not being used. These are useful warnings, generally, but are clutter right now.

Is there a directive to suppress these warnings? Same question about unused variables.

Thank you!

Put System_file; in the header of your file.

Well, wouldja lookit that…

I think it’s also possible to use the ‘-w’ switch when compiling. (The list of switches can be seen by invoking ‘inform -h2’. DM4 section 39 “Controlling compilation from without”, starting on page 239 or online at https://inform-fiction.org/manual/html/s39.html, has more.)

-w suppresses all warnings. Suppressing (some?) warnings from a single file is one of the effects of System_file.

There’s no general way to suppress “unused function” warnings, but you can hack it by writing

if (0) {
	Foo();
}

somewhere.