[packages/dqlite] - cast result of memchr to (char *) to avoid warning

witekfl witekfl at pld-linux.org
Sun Apr 19 15:23:01 CEST 2026


commit 0d08e2f6b60c808af81a3bd61b29688f4799ecd7
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Sun Apr 19 15:21:19 2026 +0200

    - cast result of memchr to (char *) to avoid warning

 cast.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
---
diff --git a/cast.patch b/cast.patch
new file mode 100644
index 0000000..e4bf549
--- /dev/null
+++ b/cast.patch
@@ -0,0 +1,66 @@
+diff -up dqlite-1.18.5/src/server.c.orig dqlite-1.18.5/src/server.c
+--- dqlite-1.18.5/src/server.c.orig	2026-01-26 09:03:58.000000000 +0100
++++ dqlite-1.18.5/src/server.c	2026-04-19 15:16:10.175908177 +0200
+@@ -1111,7 +1111,7 @@ static int parseNodeStore(char *buf, siz
+ 	struct client_node_info info;
+ 
+ 	version_str = p;
+-	nl = memchr(p, '\n', (size_t)(end - version_str));
++	nl = (char *)memchr(p, '\n', (size_t)(end - version_str));
+ 	if (nl == NULL) {
+ 		return 1;
+ 	}
+@@ -1123,7 +1123,7 @@ static int parseNodeStore(char *buf, siz
+ 
+ 	while (p != end) {
+ 		addr = p;
+-		nl = memchr(p, '\n', (size_t)(end - addr));
++		nl = (char *)memchr(p, '\n', (size_t)(end - addr));
+ 		if (nl == NULL) {
+ 			return 1;
+ 		}
+@@ -1131,7 +1131,7 @@ static int parseNodeStore(char *buf, siz
+ 		p = nl + 1;
+ 
+ 		id_str = p;
+-		nl = memchr(p, '\n', (size_t)(end - id_str));
++		nl = (char *)memchr(p, '\n', (size_t)(end - id_str));
+ 		if (nl == NULL) {
+ 			return 1;
+ 		}
+@@ -1150,7 +1150,7 @@ static int parseNodeStore(char *buf, siz
+ 		}
+ 
+ 		role_str = p;
+-		nl = memchr(p, '\n', (size_t)(end - role_str));
++		nl = (char *)memchr(p, '\n', (size_t)(end - role_str));
+ 		if (nl == NULL) {
+ 			return 1;
+ 		}
+@@ -1247,7 +1247,7 @@ static int parseLocalInfo(char *buf,
+ 	unsigned long long id;
+ 
+ 	version_str = p;
+-	nl = memchr(version_str, '\n', (size_t)(end - version_str));
++	nl = (char *)memchr(version_str, '\n', (size_t)(end - version_str));
+ 	if (nl == NULL) {
+ 		return 1;
+ 	}
+@@ -1258,7 +1258,7 @@ static int parseLocalInfo(char *buf,
+ 	}
+ 
+ 	addr = p;
+-	nl = memchr(addr, '\n', (size_t)(end - addr));
++	nl = (char *)memchr(addr, '\n', (size_t)(end - addr));
+ 	if (nl == NULL) {
+ 		return 1;
+ 	}
+@@ -1266,7 +1266,7 @@ static int parseLocalInfo(char *buf,
+ 	p = nl + 1;
+ 
+ 	id_str = p;
+-	nl = memchr(id_str, '\n', (size_t)(end - id_str));
++	nl = (char *)memchr(id_str, '\n', (size_t)(end - id_str));
+ 	if (nl == NULL) {
+ 		return 1;
+ 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dqlite.git/commitdiff/65ff7b0d28e68f406a4c4be7504b16e6219674eb



More information about the pld-cvs-commit mailing list