W7503: function defined but never called
Bad thing about this is the fact that you can't easily spot real warnings from this 'warning to ignore'.
Here's how to avoid this:
1)  define a dummy method where you call all your offending methods
// dummy function to supress warning 'function defined but never called' prototype dummySuppressWarningW7503();                     function dummySuppressWarningW7503()begin  setRegistryValue("","",0,"");end;2) call this method someplace that is definitely executed inside an if( FALSE ):
  // a little trick to stop the compiler from showing warnings  if( FALSE ) then dummySuppressWarningW7503();  endif;  Tada ! The compiler thinks its called, but it never is.
 
 
 Posts
Posts
 
 
Very slick. Thanks!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI found too that a decent way to employ this is with a dummy recursive call at the outset of an InstallScript function, passing its params as-is - for example:
ReplyDeletefunction Foo(szBar, szBaz)
begin
if (FALSE) then
Foo(szBar, szBaz);
endif;
// Moving on....
end;
Ah, I see. Yes that should work, probably better because you keep your function calls together. Nice.
ReplyDelete