Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang

2017-02-14 Thread Simon Cooksey
Perhaps following the eprintf() with return NULL; would inform the compiler correctly without changing the semantics of the program. I worry if a smarter compiler would just warn about the statement being unreachable though. Warning cat-and-mouse is probably something to avoid. - Simon On 07/0

Re: Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang

2017-02-07 Thread Hiltjo Posthuma
On Mon, Feb 06, 2017 at 02:04:52PM -0800, Evan Gates wrote: > Hiltjo Posthuma wrote: > > > Probably a false positive, but for ed.c it looks ok to me. > > > > The join.c patch does not look ok to me (clang doesn't detect that > > eprintf() exists the program), so it's a false positive. > > This

Re: Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang

2017-02-06 Thread Evan Gates
Hiltjo Posthuma wrote: > Probably a false positive, but for ed.c it looks ok to me. > > The join.c patch does not look ok to me (clang doesn't detect that > eprintf() exists the program), so it's a false positive. This is where the _Noreturn or noreturn attribute is handy. Unfortunately that's

Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang

2017-02-03 Thread S . J . Cooksey
list Subject: Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang Probably a false positive, but for ed.c it looks ok to me. The join.c patch does not look ok to me (clang doesn't detect that eprintf() exists the program), so it's a false positiv

Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang

2017-02-02 Thread Hiltjo Posthuma
Probably a false positive, but for ed.c it looks ok to me. The join.c patch does not look ok to me (clang doesn't detect that eprintf() exists the program), so it's a false positive. On Thu, Feb 2, 2017 at 3:43 PM, Simon Cooksey wrote: > - ed.c >Initialise hline in `static int makeline(char,