[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-API] [PATCH] imported patch removing-warnings



Hi Jon, Vincent,

I'm glad patches are getting reviewed :)

I know that an empty assignment with no side-effects can be removed, and I did 
it in some of the most obvious cases. However, I think it's better to be 
conservative here, rather than introducing hard-to-find bugs, which occur due 
to subtle side-effects missing.

Also, you have to consider the other option, i.e. that the statement should be 
there, and that something else, which uses this statement, is missing.

Using "_" (and a commented out variable name) makes it obvious in the code that 
a certain variable is not used (maybe we should write an IDE plug-in that does 
this?). Therefore, when a person who is familiar with (or even wrote) the code 
sees this, he can make the final decision about the removal, or do something 
else.

This patch is in fact only a start of removing the sea of warnings that get 
generated while compiling xen-api.hg. Currently, there are so many warnings 
that nobody pays attention to them any more, or notices that they generated a 
new one --- the whole purpose of warnings is lost. The goal is to reach zero 
warnings, and then enable the warnings-as-errors flag.

Therefore, I think the patch is safe as-is, but feel free to remove assignments 
you are definitely sure don't give side-effects _and_ were not meant for 
something else.

Thanks a lot for your feedback.

Regards,
Rok

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.