Archive: Eliminating "zeroing code out" warning


Eliminating "zeroing code out" warning
Hi,

i am using the EnvVarUpdate.nsh to set a system variable.
Now I am getting the following warning:

"uninstall function un.EnvVarUpdate" not referenced - zeroing code (179-377) out"


Indicating i am not calling "un.EnvVarUpdate" - removing that system variable during uninstallment. However for certain reasons I do not want to remove that variable. But how can i get rid of that warning without calling "un.EnvVarUpdate"?

Thanks,
TeeWeTee

You're mistaken about the meaning of the warning.

The warning does not mean that the uninstaller will remove the environment variable during uninstall. (The NSIS compiler doesn't actually understand NSIS scripts on such a level.)
In fact, the warning only means that the function "un.EnvVarUpdate" is never *called* by your script, and therefore the function is never used. Unused functions only consume memory without ever doing anything, so the compiler just skips the function and doesn't compile it.

Unused functions are perfectly fine. (After all, the only bad thing they could do is waste memory, and the compiler prevents that by skipping their code.) As long as *you* don't remove the enironment variable during uninstall, then *NSIS* will also not remove it. NSIS only does exactly what you tell it to do in the nsi script.


Hi,

thanks for your answer.
However I was not mistaken about the warning mabye i didn't write it clearly. As I said in my previous post ("Indicating i am not calling "un.EnvVarUpdate" ") i am not calling that function so i get that warning. There is of course no magic removal of that variable or things like that ;)

My question was: How can I get rid of that warning without calling "un.EnvVarUpdate" in my script. I know that the warning can be ignored - however I don't want to. Thus my question is: Is there is a way to remove or surpress that warning.

Thanks
TeeWeTee


One possibility I see is to adapt the 'EnvVarUpdate.nsh' file and remove the code - however I had hoped there's a better solution...


Apparently, a single google for 'nsis suppress warnings' would give you this:
http://forums.winamp.com/showthread.php?t=313194


Actually i did a google search before but probably i shouldn't have used quotes in the search term :D