[dm-devel] [PATCH] kpartx/devmapper.c: fix unused-but-set variable error

Martin Wilck mwilck at suse.com
Thu Jan 6 10:58:19 UTC 2022


On Thu, 2022-01-06 at 11:55 +0100, Martin Wilck wrote:
> On Wed, 2022-01-05 at 22:30 +0000, Sergei Trofimovich wrote:
> > On gcc-12 build failed as:
> > 
> >     devmapper.c: In function 'dm_simplecmd':
> >     devmapper.c:61:13: error: unused variable 'udev_wait_flag' [-
> > Werror=unused-variable]
> >        61 |         int udev_wait_flag = (task == DM_DEVICE_RESUME
> > ||
> >           |             ^~~~~~~~~~~~~~
> > 
> > Fix error by hiding it's declaration under #ifdef that uses it.
> > CC: Martin Wilck <mwilck at suse.com>
> > CC: Benjamin Marzinski <bmarzins at redhat.com>
> > ---
> >  kpartx/devmapper.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Under https://github.com/opensvc/multipath-tools/pull/23/files
> you posted a different patch, containing additional changes.
> 
> Are you saying this alone fixes your issue?

Sorry, I overlooked your second patch.
Next time, please send a series.

Regards
Martin





More information about the dm-devel mailing list