[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Mon Nov 29 12:40:47 MST 2010
Jelmer Vernooij wrote:
> Then please don't say you don't consider yourself responsible (perhaps
> there is some language confusion here?).
Probably I've not expressed it correctly.
It was like this: since the Solaris "cc" compiler blamed about this I
thought that it would be convenient to quiet these warnings. Exactly
this was the intention.
And I really think that it's not a fault to fix warnings (naturally in a
convenient and acceptable manner) if the behaviour doesn't change. And
exactly here we have such a case.
> The coding style guide is important, but even more important is common
> sense. Just because the coding style doesn't forbid something doesn't
> mean it's a good idea.
Yes, I agree.
> Most compilers probably wouldn't even compile this code into the binary
> if they noticed it wasn't reachable. Even if they did then this
> improvement is negligible. It will save us literally a couple of mmapped
> bytes in the testsuite code at most.
> Please look at the bigger picture. These are a few bytes. A full Samba 4
> developer build is something like 230 Mb. Again, even if the compiler
> didn't optimize out that return statement then there wouldn't be any
> relevant difference. (I'll leave out fs blocks for simplicity here)
> If we were that desperate to reduce the size of our binaries on disk
> then we would be reducing the length of the names of the symbols we
> export, we'd be removing DEBUG statements, we'd be removing comments in
> Python code.
> I could the point in changing this code if it made it more readable, but
> it doesn't do that.
Agreed, it doesn't change much - btw here a related Wikipedia article
http://en.wikipedia.org/wiki/Dead_code_elimination - but the intention
was more to quiet the warnings than the filesize.
More information about the samba-technical