From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "mwilck@suse.com" <mwilck@suse.com>,
"christophe.varoqui@opensvc.com" <christophe.varoqui@opensvc.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [PATCH v2 04/23] libmultipath: parser: use call-by-value for "snprint" methods
Date: Thu, 15 Mar 2018 14:25:28 +0000 [thread overview]
Message-ID: <1521123927.3336.1.camel@wdc.com> (raw)
In-Reply-To: <20180305231507.10386-5-mwilck@suse.com>
On Tue, 2018-03-06 at 00:14 +0100, Martin Wilck wrote:
> Convert the snprint methods for all keywords to call-by-value,
> and use "const" qualifier for the "data" argument. This makes sure
> that "snprint" type functions don't modify the data they're print,
> helps compile-time correctness checking, and allows more proper
> "const" cleanups in the future.
Hello Martin,
With this patch applied on top of Christophe's master branch:
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index ea273dd91962..ac9216c4c5f3 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -23,6 +23,7 @@
#include <errno.h>
#include <inttypes.h>
#include "mpath_cmd.h"
+#include "dict.h"
static int
set_int(vector strvec, void *ptr)
I see a whole bunch of warnings appear (see below). Can you have a look at
this?
Thanks,
Bart.
dict.c:627:1: error: conflicting types for 'print_fast_io_fail'
print_fast_io_fail(char * buff, int len, long v)
^~~~~~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:16:5: note: previous declaration of 'print_fast_io_fail' was here
int print_fast_io_fail(char * buff, int len, void *ptr);
^~~~~~~~~~~~~~~~~~
dict.c:666:1: error: conflicting types for 'print_dev_loss'
print_dev_loss(char * buff, int len, unsigned long v)
^~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:17:5: note: previous declaration of 'print_dev_loss' was here
int print_dev_loss(char * buff, int len, void *ptr);
^~~~~~~~~~~~~~
dict.c:697:1: error: conflicting types for 'print_pgpolicy'
print_pgpolicy(char * buff, int len, long pgpolicy)
^~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:14:5: note: previous declaration of 'print_pgpolicy' was here
int print_pgpolicy(char * buff, int len, void *ptr);
^~~~~~~~~~~~~~
dict.c:814:1: error: conflicting types for 'print_rr_weight'
print_rr_weight (char * buff, int len, long v)
^~~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:12:5: note: previous declaration of 'print_rr_weight' was here
int print_rr_weight (char * buff, int len, void *ptr);
^~~~~~~~~~~~~~~
dict.c:860:1: error: conflicting types for 'print_pgfailback'
print_pgfailback (char * buff, int len, long v)
^~~~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:13:5: note: previous declaration of 'print_pgfailback' was here
int print_pgfailback (char * buff, int len, void *ptr);
^~~~~~~~~~~~~~~~
dict.c:907:1: error: conflicting types for 'print_no_path_retry'
print_no_path_retry(char * buff, int len, long v)
^~~~~~~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:15:5: note: previous declaration of 'print_no_path_retry' was here
int print_no_path_retry(char * buff, int len, void *ptr);
^~~~~~~~~~~~~~~~~~~
dict.c:1049:1: error: conflicting types for 'print_off_int_undef'
print_off_int_undef(char * buff, int len, long v)
^~~~~~~~~~~~~~~~~~~
In file included from dict.c:26:0:
dict.h:19:5: note: previous declaration of 'print_off_int_undef' was here
int print_off_int_undef(char * buff, int len, void *ptr);
^~~~~~~~~~~~~~~~~~~
make[1]: *** [../Makefile.inc:131: dict.o] Error 1
make: *** [Makefile:25: recurse] Error 2
install: cannot remove '/lib64/libmpathcmd.so.0': Permission denied
make[1]: *** [Makefile:19: install] Error 1
make: *** [Makefile:34: recurse_install] Error 2
Compilation exited abnormally with code 2 at Thu Mar 15 07:23:12
next prev parent reply other threads:[~2018-03-15 14:25 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 23:14 [PATCH v2 00/23] "Foreign" NVMe support for multipath-tools Martin Wilck
2018-03-05 23:14 ` [PATCH v2 01/23] multipath(d)/Makefile: add explicit dependency on libraries Martin Wilck
2018-03-06 7:04 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 02/23] libmultipath: remove unused "stdout helpers" Martin Wilck
2018-03-06 7:04 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 03/23] libmultipath: get rid of selector "hack" in print.c Martin Wilck
2018-03-06 7:05 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 04/23] libmultipath: parser: use call-by-value for "snprint" methods Martin Wilck
2018-03-06 7:05 ` Hannes Reinecke
2018-03-15 14:25 ` Bart Van Assche [this message]
2018-03-05 23:14 ` [PATCH v2 05/23] libmultipath: don't update path groups when printing Martin Wilck
2018-03-06 7:06 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 06/23] libmultipath/print: use "const" where appropriate Martin Wilck
2018-03-06 7:07 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 07/23] libmultipath: use "const" in devmapper code Martin Wilck
2018-03-06 7:07 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 09/23] multipath-tools: Makefile.inc: use -Werror=cast-qual Martin Wilck
2018-03-06 7:08 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 10/23] libmultipath: add vector_free_const() Martin Wilck
2018-03-06 1:01 ` Bart Van Assche
2018-03-06 7:08 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 11/23] libmultipath: add vector_convert() Martin Wilck
2018-03-06 7:10 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 12/23] libmultipath: "generic multipath" interface Martin Wilck
2018-03-06 7:10 ` Hannes Reinecke
2018-03-07 19:01 ` Benjamin Marzinski
2018-03-05 23:14 ` [PATCH v2 13/23] libmultipath: print: convert API to generic data type Martin Wilck
2018-03-06 7:11 ` Hannes Reinecke
2018-03-07 19:02 ` Benjamin Marzinski
2018-03-05 23:14 ` [PATCH v2 14/23] libmultipath: print: use generic API for get_x_layout() Martin Wilck
2018-03-06 7:12 ` Hannes Reinecke
2018-03-05 23:14 ` [PATCH v2 15/23] libmultipath: API for foreign multipath handling Martin Wilck
2018-03-06 7:12 ` Hannes Reinecke
2018-03-07 19:08 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 16/23] libmultipath/print: add "%G - foreign" wildcard Martin Wilck
2018-03-06 7:13 ` Hannes Reinecke
2018-03-05 23:15 ` [PATCH v2 17/23] libmultipath/foreign: nvme foreign library Martin Wilck
2018-03-06 7:13 ` Hannes Reinecke
2018-03-07 19:09 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 18/23] libmultipath: pathinfo: call into " Martin Wilck
2018-03-06 7:14 ` Hannes Reinecke
2018-03-07 19:10 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 19/23] multipath: use foreign API Martin Wilck
2018-03-06 7:14 ` Hannes Reinecke
2018-03-07 19:11 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 20/23] multipathd: " Martin Wilck
2018-03-06 7:15 ` Hannes Reinecke
2018-03-07 19:25 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 21/23] libmultipath: foreign/nvme: implement path display Martin Wilck
2018-03-06 7:15 ` Hannes Reinecke
2018-03-07 19:27 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 22/23] multipathd: update path group prio in check_path Martin Wilck
2018-03-06 7:16 ` Hannes Reinecke
2018-03-07 20:01 ` Benjamin Marzinski
2018-03-05 23:15 ` [PATCH v2 23/23] multipathd: fix signal blocking logic Martin Wilck
2018-03-06 7:16 ` Hannes Reinecke
2018-03-06 8:55 ` Martin Wilck
2018-03-07 20:24 ` Benjamin Marzinski
[not found] ` <20180305231507.10386-9-mwilck@suse.com>
2018-03-06 7:08 ` [PATCH v2 08/23] libmultipath: fix compiler warnings for -Wcast-qual Hannes Reinecke
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=1521123927.3336.1.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=mwilck@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