Old 25th March 2013, 10:24   #1
TeeWeTee
Junior Member
 
Join Date: Feb 2013
Posts: 14
Eliminating "zeroing code out" warning

Hi,

i am using the EnvVarUpdate.nsh to set a system variable.
Now I am getting the following warning:
code:
"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
TeeWeTee is offline   Reply With Quote
Old 25th March 2013, 10:33   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 25th March 2013, 11:25   #3
TeeWeTee
Junior Member
 
Join Date: Feb 2013
Posts: 14
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
TeeWeTee is offline   Reply With Quote
Old 25th March 2013, 11:28   #4
TeeWeTee
Junior Member
 
Join Date: Feb 2013
Posts: 14
One possibility I see is to adapt the 'EnvVarUpdate.nsh' file and remove the code - however I had hoped there's a better solution...
TeeWeTee is offline   Reply With Quote
Old 25th March 2013, 11:47   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Apparently, a single google for 'nsis suppress warnings' would give you this:
http://forums.winamp.com/showthread.php?t=313194
MSG is offline   Reply With Quote
Old 25th March 2013, 12:21   #6
TeeWeTee
Junior Member
 
Join Date: Feb 2013
Posts: 14
Actually i did a google search before but probably i shouldn't have used quotes in the search term
TeeWeTee is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump