Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/2] nvme-cli wdc plugin: Add get pfail dump command.
Date: Wed, 24 Oct 2018 10:22:10 -0600	[thread overview]
Message-ID: <20181024162209.GA4461@localhost.localdomain> (raw)
In-Reply-To: <CAPrnrPAhfJmp48zNDgM3JYP2g0BbgAGDgdkB1OCotXHb_00FcQ@mail.gmail.com>

On Wed, Oct 24, 2018@07:10:10PM +0300, Eyal BenDavid wrote:
> The patched version fails to build on Fedora 28 (gcc 8.1.1) due to a warning.
> 
> Here is the message:
> 
> cc -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -g -Wall -Werror -std=gnu99
> -DLIBUUID -DNVME_VERSION='"1.6.96.g352d"' -c wdc-nvme.c
> wdc-nvme.c: In function ?wdc_crash_dump?:
> wdc-nvme.c:1151:3: error: ?strncpy? output truncated before
> terminating nul copying 11 bytes from a string of the same length
> [-Werror=stringop-truncation]
>    strncpy(dump_type, "_pfail_dump", 11);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> wdc-nvme.c:1153:3: error: ?strncpy? output truncated before
> terminating nul copying 11 bytes from a string of the same length
> [-Werror=stringop-truncation]
>    strncpy(dump_type, "_crash_dump", 11);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make: *** [Makefile:46: wdc-nvme.o] Error 1
> On Fri, Oct 19, 2018@8:21 PM Keith Busch <keith.busch@linux.intel.com> wrote:

Thanks for the notice. The pattern used in that patch is a bit odd as
you'd normally supply the size of the destination to strncpy rather than
the source. I'll fix that up.

  reply	other threads:[~2018-10-24 16:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 21:06 [PATCH 1/2] nvme-cli wdc plugin: Add get pfail dump command Dong Ho
2018-10-18 21:06 ` [PATCH 2/2] nvme-cli wdc plugin: Add documentation for pfail dump Dong Ho
2018-10-19 17:17 ` [PATCH 1/2] nvme-cli wdc plugin: Add get pfail dump command Keith Busch
2018-10-24 16:10   ` Eyal BenDavid
2018-10-24 16:22     ` Keith Busch [this message]
2018-10-24 16:28       ` Eyal BenDavid
2018-10-24 21:42         ` Jeffrey Lien
2018-10-24 21:51           ` Keith Busch
2018-10-24 22:19             ` Chaitanya Kulkarni
2018-10-25 15:58               ` Jeffrey Lien
2018-10-25 16:00                 ` Keith Busch
2018-10-25 17:25                   ` Jeffrey Lien
2018-10-25 17:28                   ` Jeffrey Lien
2018-10-25 17:47                   ` Jeffrey Lien
2018-10-25 18:02                     ` Keith Busch

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=20181024162209.GA4461@localhost.localdomain \
    --to=keith.busch@intel.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