All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@linux.intel.com (Keith Busch)
Subject: [PATCH] nvme-cli: fix compilation error
Date: Mon, 11 Jun 2018 08:57:29 -0600	[thread overview]
Message-ID: <20180611145729.GA712@localhost.localdomain> (raw)
In-Reply-To: <20180611020341.2647-1-chaitanya.kulkarni@wdc.com>

On Sun, Jun 10, 2018@10:03:41PM -0400, Chaitanya Kulkarni wrote:
> [root at q nvme-cli]# make
> NVME_VERSION = 1.5.182.g80f2
> cc -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -g -Wall -Werror -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.5.182.g80f2"' -c nvme-print.c
> nvme-print.c: In function ?show_self_test_log?:
> nvme-print.c:1282:4: error: format ?%lx? expects argument of type ?long unsigned int?, but argument 2 has type ?__le64? [-Werror=format=]
>     le64_to_cpu(self_test->result[i].power_on_hours));
>     ^

The way we've been fixing this is to cast the return of le64_to_cpu to
uint64_t. That should work for 64 and 32 bit.

  reply	other threads:[~2018-06-11 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  2:03 [PATCH] nvme-cli: fix compilation error Chaitanya Kulkarni
2018-06-11 14:57 ` Keith Busch [this message]
2018-06-11 15:07   ` Chaitanya Kulkarni

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=20180611145729.GA712@localhost.localdomain \
    --to=keith.busch@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.