[PATCH 6/7] net/memif: fix const pointer in socket check

David Marchand david.marchand at redhat.com
Fri Nov 28 14:56:14 CET 2025


With latest glibc (Fedora Rawhide):
../drivers/net/memif/rte_eth_memif.c: In function
	'memif_check_socket_filename':
../drivers/net/memif/rte_eth_memif.c:1848:13: warning: assignment discards
	'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 1848 |         tmp = strrchr(filename, '/');
      |             ^

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Cc: stable at dpdk.org

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 drivers/net/memif/rte_eth_memif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 9de6f97cd9..8d7060cd7c 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1836,7 +1836,8 @@ memif_set_rs(const char *key __rte_unused, const char *value, void *extra_args)
 static int
 memif_check_socket_filename(const char *filename)
 {
-	char *dir = NULL, *tmp;
+	char *dir = NULL;
+	const char *tmp;
 	uint32_t idx;
 	int ret = 0;
 
-- 
2.51.1



More information about the dev mailing list