Re: -Wuninitialized warning in drivers/misc/sgi-xp/xpc_partition.c

2019-05-22 Thread Stephen Hines
Hi Nathan, Since this kind of self-initialization is considered undefined behavior, the simplest fix here is to just initialize to NULL. It's a reasonable interpretation of what is currently written, and will at least make the existing code more deterministic. Thanks, Steve On Wed, May 22, 2019

Re: -Wuninitialized warning in drivers/misc/sgi-xp/xpc_partition.c

2019-05-22 Thread Greg Kroah-Hartman
On Wed, May 22, 2019 at 06:56:39PM -0700, Nathan Chancellor wrote: > On Thu, May 02, 2019 at 08:33:40PM -0700, Nathan Chancellor wrote: > > Hi all, > > > > When building with -Wuninitialized, Clang warns: > > > > drivers/misc/sgi-xp/xpc_partition.c:73:14: warning: variable 'buf' is > > uninitial

Re: -Wuninitialized warning in drivers/misc/sgi-xp/xpc_partition.c

2019-05-22 Thread Nathan Chancellor
On Thu, May 02, 2019 at 08:33:40PM -0700, Nathan Chancellor wrote: > Hi all, > > When building with -Wuninitialized, Clang warns: > > drivers/misc/sgi-xp/xpc_partition.c:73:14: warning: variable 'buf' is > uninitialized when used within its own initialization [-Wuninitialized] > void *bu

-Wuninitialized warning in drivers/misc/sgi-xp/xpc_partition.c

2019-05-02 Thread Nathan Chancellor
Hi all, When building with -Wuninitialized, Clang warns: drivers/misc/sgi-xp/xpc_partition.c:73:14: warning: variable 'buf' is uninitialized when used within its own initialization [-Wuninitialized] void *buf = buf; ~~~ ^~~ 1 warning generated. I am not really sure how t