Linux-NFS Archive on lore.kernel.org
 help / color / Atom feed
* [patch] fix compilation with -Werror=format on i586
@ 2019-11-21 22:59 Guillaume Rousse
  2019-11-22 15:54 ` Steve Dickson
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Rousse @ 2019-11-21 22:59 UTC (permalink / raw)
  To: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0001-fix-compilation-with-Werror-format-on-i586.patch --]
[-- Type: text/x-patch, Size: 5142 bytes --]

From 571884617231dc4bc70caafd69a62c86e2bca445 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillomovitch@gmail.com>
Date: Thu, 21 Nov 2019 23:58:57 +0100
Subject: [PATCH] fix compilation with  -Werror=format on i586

---
 support/junction/xml.c  |  2 +-
 tools/locktest/testlk.c |  2 +-
 utils/nfsdcld/nfsdcld.c | 14 +++++++-------
 utils/nfsdcld/sqlite.c  |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/support/junction/xml.c b/support/junction/xml.c
index 7005e95e..813110b4 100644
--- a/support/junction/xml.c
+++ b/support/junction/xml.c
@@ -327,7 +327,7 @@ junction_parse_xml_read(const char *pathname, int fd, const char *name,
 	if (retval != FEDFS_OK)
 		return retval;
 
-	xlog(D_CALL, "%s: XML document contained in junction:\n%ld.%s",
+	xlog(D_CALL, "%s: XML document contained in junction:\n%zu.%s",
 		__func__, len, (char *)buf);
 
 	retval = junction_parse_xml_buf(pathname, name, buf, len, doc);
diff --git a/tools/locktest/testlk.c b/tools/locktest/testlk.c
index b392f711..ea51f788 100644
--- a/tools/locktest/testlk.c
+++ b/tools/locktest/testlk.c
@@ -81,7 +81,7 @@ main(int argc, char **argv)
 		if (fl.l_type == F_UNLCK) {
 			printf("%s: no conflicting lock\n", fname);
 		} else {
-			printf("%s: conflicting lock by %d on (%ld;%ld)\n",
+			printf("%s: conflicting lock by %d on (%zd;%zd)\n",
 				fname, fl.l_pid, fl.l_start, fl.l_len);
 		}
 		return 0;
diff --git a/utils/nfsdcld/nfsdcld.c b/utils/nfsdcld/nfsdcld.c
index b064336d..9297df51 100644
--- a/utils/nfsdcld/nfsdcld.c
+++ b/utils/nfsdcld/nfsdcld.c
@@ -378,7 +378,7 @@ cld_not_implemented(struct cld_client *clnt)
 	bsize = cld_message_size(cmsg);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize)
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 
 	/* reopen pipe, just to be sure */
@@ -409,7 +409,7 @@ cld_get_version(struct cld_client *clnt)
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -459,7 +459,7 @@ reply:
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -498,7 +498,7 @@ reply:
 			cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -548,7 +548,7 @@ reply:
 			cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -607,7 +607,7 @@ reply:
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -667,7 +667,7 @@ reply:
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
diff --git a/utils/nfsdcld/sqlite.c b/utils/nfsdcld/sqlite.c
index 23be7971..09518e22 100644
--- a/utils/nfsdcld/sqlite.c
+++ b/utils/nfsdcld/sqlite.c
@@ -512,7 +512,7 @@ sqlite_startup_query_grace(void)
 	current_epoch = tcur;
 	recovery_epoch = trec;
 	ret = 0;
-	xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+	xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64,
 		__func__, current_epoch, recovery_epoch);
 out:
 	sqlite3_finalize(stmt);
@@ -1223,7 +1223,7 @@ sqlite_grace_start(void)
 
 	current_epoch = tcur;
 	recovery_epoch = trec;
-	xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+	xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64,
 		__func__, current_epoch, recovery_epoch);
 
 out:
@@ -1282,7 +1282,7 @@ sqlite_grace_done(void)
 	}
 
 	recovery_epoch = 0;
-	xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+	xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64,
 		__func__, current_epoch, recovery_epoch);
 
 out:
-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix compilation with -Werror=format on i586
  2019-11-21 22:59 [patch] fix compilation with -Werror=format on i586 Guillaume Rousse
@ 2019-11-22 15:54 ` Steve Dickson
  2019-11-25 14:37   ` Guillaume Rousse
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2019-11-22 15:54 UTC (permalink / raw)
  To: Guillaume Rousse, linux-nfs

Hello,

On 11/21/19 5:59 PM, Guillaume Rousse wrote:

A couple things... In the future please in line the patch
instead of attaching it and please use the appropriate
Signed-off-by: line

Half of your patch already existed due to commit a20dbec9

The rest of the patch I did Commit (tag: nfs-utils-2-4-3-rc2)

steved.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix compilation with -Werror=format on i586
  2019-11-22 15:54 ` Steve Dickson
@ 2019-11-25 14:37   ` Guillaume Rousse
  0 siblings, 0 replies; 3+ messages in thread
From: Guillaume Rousse @ 2019-11-25 14:37 UTC (permalink / raw)
  To: linux-nfs



Le 22/11/2019 à 16:54, Steve Dickson a écrit :
> Hello,
> 
> On 11/21/19 5:59 PM, Guillaume Rousse wrote:
> 
> A couple things... In the future please in line the patch
> instead of attaching it and please use the appropriate
> Signed-off-by: line
> 
> Half of your patch already existed due to commit a20dbec9
> 
> The rest of the patch I did Commit (tag: nfs-utils-2-4-3-rc2)
Sorry for those beginner errors, I'll try to do better next time.

Regards.
-- 
Guillaume

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 22:59 [patch] fix compilation with -Werror=format on i586 Guillaume Rousse
2019-11-22 15:54 ` Steve Dickson
2019-11-25 14:37   ` Guillaume Rousse

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org
	public-inbox-index linux-nfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git