[PATCH] NVMe: fix uninitialized iod compiler warning
Matthew Wilcox
willy at linux.intel.com
Thu Jul 26 10:50:57 EDT 2012
On Wed, Jul 25, 2012 at 04:04:29PM -0600, Keith Busch wrote:
> int status, length;
> - struct nvme_iod *iod;
> + struct nvme_iod *iod = NULL;
>
So this is a compiler bug. And it's not present in every compiler
version; it didn't occur on my machine until I upgraded gcc recently.
There's no way that iod can be used uninitialised. The correct way to
indicate this is:
+ struct nvme_iod *uninitialized_var(iod);
More information about the Linux-nvme
mailing list