From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [dm-devel] [PATCH v2 1/5] multipath: fix issues found by compiling with gcc 10
Date: Thu, 3 Dec 2020 14:52:03 -0600 [thread overview]
Message-ID: <20201203205203.GH3103@octiron.msp.redhat.com> (raw)
In-Reply-To: <6d9b937e46499c5d35921d2eb62943c987b46425.camel@suse.com>
On Wed, Dec 02, 2020 at 01:54:57PM +0000, Martin Wilck wrote:
> Hi Ben,
>
> On Wed, 2020-02-19 at 14:21 -0600, Benjamin Marzinski wrote:
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> > kpartx/dasd.c | 6 +++---
> > libmultipath/print.c | 16 ++++++++--------
> > multipath/main.c | 2 +-
> > 3 files changed, 12 insertions(+), 12 deletions(-)
> >
> > diff --git a/kpartx/dasd.c b/kpartx/dasd.c
> > index 1486ccaa..14b9d3aa 100644
> > --- a/kpartx/dasd.c
> > +++ b/kpartx/dasd.c
> > @@ -186,7 +186,7 @@ read_dasd_pt(int fd, __attribute__((unused))
> > struct slice all,
> > goto out;
> > }
> >
> > - if ((!info.FBA_layout) && (!strcmp(info.type, "ECKD")))
> > + if ((!info.FBA_layout) && (!memcmp(info.type, "ECKD", 4)))
> > memcpy (&vlabel, data, sizeof(vlabel));
> > else {
> > bzero(&vlabel,4);
>
> are you using different compiler / warning flags here than we usually do?
When building rhel and fedora packages, there are some flags that differ
from the upstream set. Unfortunately, when I just tried rebuilding the
package with these fixes removed, I didn't hit any compiler errors.
Perhaps I just noticed these while working on something else, and they
got included in this commit on accident. Sadly I don't remember the
details anymore.
-Ben
>
> I just found that with the standard flags, gcc 10 does *not* complain about
> the old (badly broken, noting that info.type is declared as char[4]) code.
> Nor has any other compiler so far, although we're using pretty verbose
> warning options.
>
> Regards
> Martin
>
> --
> Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
> SUSE Software Solutions Germany GmbH
> HRB 36809, AG Nürnberg GF: Felix
> Imendörffer
>
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2020-12-03 20:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 20:21 [PATCH v2 0/5] Multipath Follow-up patches Benjamin Marzinski
2020-02-19 20:21 ` [PATCH v2 1/5] multipath: fix issues found by compiling with gcc 10 Benjamin Marzinski
2020-02-19 20:39 ` Martin Wilck
2020-12-02 13:54 ` [dm-devel] " Martin Wilck
2020-12-03 20:52 ` Benjamin Marzinski [this message]
2020-02-19 20:21 ` [PATCH v2 2/5] libmultipath: turn pp->vpd_data into a pointer Benjamin Marzinski
2020-02-19 20:21 ` [PATCH v2 3/5] libmultipath: change loading and resetting in directio Benjamin Marzinski
2020-02-19 20:21 ` [PATCH v2 4/5] libmultipath: change directio get_events() timeout handling Benjamin Marzinski
2020-02-19 20:21 ` [PATCH v2 5/5] libmultipath: cleanup old issues with directio checker Benjamin Marzinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201203205203.GH3103@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=martin.wilck@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).