Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Alexander Best
On Sun Nov 6 11, Ed Schouten wrote: Hello Alexander! Even though that I agree that Clang is sometimes a bit picky, we'd better spend the time fixing the actual bugs in the code. I am more than willing to commit patches that fix actual warnings/errors in code. the problem is, something like

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Dimitry Andric
On 2011-11-06 21:33, Alexander Best wrote: ... the problem is, something like uint x; if (x 0) ... clang will warn about this, yet it is 100% valid code so my vote would be to make such an error into a warning. Sorry, but checking something unsigned to be smaller than zero is bogus,

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Alexander Best
On Sun Nov 6 11, Dimitry Andric wrote: On 2011-11-06 21:33, Alexander Best wrote: ... the problem is, something like uint x; if (x 0) ... clang will warn about this, yet it is 100% valid code so my vote would be to make such an error into a warning. Sorry, but checking

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Rui Paulo
On Nov 6, 2011, at 12:58 PM, Alexander Best wrote: On Sun Nov 6 11, Dimitry Andric wrote: On 2011-11-06 21:33, Alexander Best wrote: ... the problem is, something like uint x; if (x 0) ... clang will warn about this, yet it is 100% valid code so my vote would be to make such an

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Warner Losh
On Nov 6, 2011, at 1:58 PM, Alexander Best wrote: On Sun Nov 6 11, Dimitry Andric wrote: On 2011-11-06 21:33, Alexander Best wrote: ... the problem is, something like uint x; if (x 0) ... clang will warn about this, yet it is 100% valid code so my vote would be to make such an

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Warner Losh
On Nov 6, 2011, at 2:13 PM, Rui Paulo wrote: The only argument against this tautological check that I agree with is when the code is explicitly trying to be safe. If the developer checks for i 0 when indexing an array he/she is trying to guard against possible pitfalls in the future when

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Rui Paulo
On Nov 6, 2011, at 4:36 PM, Warner Losh wrote: On Nov 6, 2011, at 2:13 PM, Rui Paulo wrote: The only argument against this tautological check that I agree with is when the code is explicitly trying to be safe. If the developer checks for i 0 when indexing an array he/she is trying to guard

Re: [poc] buildkernel + clang + -Werror

2011-11-06 Thread Warner Losh
On Nov 6, 2011, at 5:47 PM, Rui Paulo wrote: On Nov 6, 2011, at 4:36 PM, Warner Losh wrote: On Nov 6, 2011, at 2:13 PM, Rui Paulo wrote: The only argument against this tautological check that I agree with is when the code is explicitly trying to be safe. If the developer checks for i 0