Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
nvme-cli.11346
0004-Fix-compilation-with-GCC-8.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-Fix-compilation-with-GCC-8.patch of Package nvme-cli.11346
From dc26bb70d82569730b4ce5c88f22084812a2334d Mon Sep 17 00:00:00 2001 From: Breno Leitao <leitao@debian.org> Date: Mon, 21 Jan 2019 06:31:15 -0500 Subject: [PATCH] Fix compilation with GCC-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Printf() is being called to print an unsigned long int using the long long identifier. This causes the following error with GCC-8: nvme.c:3056:5: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=] "Invalid value for block size (%llu), must be a power of two\n", ^ nvme.c:3091:6: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=] "LBAF corresponding to block size %llu (LBAF %u) not found\n", Adjusting the printf arguments to print the proper format. Signed-off-by: Breno Leitao <leitao@debian.org> --- nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvme.c b/nvme.c index 992c6b9..e85834d 100644 --- a/nvme.c +++ b/nvme.c @@ -3053,7 +3053,7 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu if (cfg.bs) { if ((cfg.bs & (~cfg.bs + 1)) != cfg.bs) { fprintf(stderr, - "Invalid value for block size (%llu), must be a power of two\n", + "Invalid value for block size (%lu), must be a power of two\n", cfg.bs); return EINVAL; } @@ -3088,7 +3088,7 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu } if (cfg.lbaf == 0xff) { fprintf(stderr, - "LBAF corresponding to block size %llu (LBAF %u) not found\n", + "LBAF corresponding to block size %lu (LBAF %u) not found\n", cfg.bs, lbads); fprintf(stderr, "Please correct block size, or specify LBAF directly\n"); -- 2.13.7
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor