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
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
Thanks a lot for your feedback.
xen-api mailing list