DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Reshma Pattan <reshma.pattan@intel.com>,
	Harry van Haaren <harry.van.haaren@intel.com>,
	Roman Korynkevych <romanx.korynkevych@intel.com>,
	Maryam Tahhan <mtahhan@redhat.com>
Subject: [PATCH 7/7] app/procinfo: fix const pointer in collectd format
Date: Fri, 28 Nov 2025 14:56:15 +0100	[thread overview]
Message-ID: <20251128135616.2662164-8-david.marchand@redhat.com> (raw)
In-Reply-To: <20251128135616.2662164-1-david.marchand@redhat.com>

With latest glibc (Fedora Rawhide):
../app/proc-info/main.c: In function 'collectd_resolve_cnt_type':
../app/proc-info/main.c:689:26: warning: initialization discards
	'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  689 |         char *type_end = strrchr(cnt_name, '_');
      |                          ^~~~~~~

Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index b09c03ab35..5925bbb765 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -686,7 +686,7 @@ nic_stats_clear(uint16_t port_id)
 
 static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
 				      const char *cnt_name) {
-	char *type_end = strrchr(cnt_name, '_');
+	const char *type_end = strrchr(cnt_name, '_');
 
 	if ((type_end != NULL) &&
 	    (strncmp(cnt_name, "rx_", strlen("rx_")) == 0)) {
-- 
2.51.1


      parent reply	other threads:[~2025-11-28 13:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 13:56 [PATCH 0/7] Fixes for Fedora Rawhide David Marchand
2025-11-28 13:56 ` [PATCH 1/7] bus/ifpga: fix const pointer in device name parsing David Marchand
2025-11-28 13:56 ` [PATCH 2/7] bus/uacce: fix const pointer in device matching David Marchand
2025-11-28 13:56 ` [PATCH 3/7] drivers: fix some const pointers in qat drivers David Marchand
2025-11-28 13:56 ` [PATCH 4/7] crypto/caam_jr: fix const pointer in UIO filename parsing David Marchand
2025-11-28 14:00   ` Hemant Agrawal
2025-11-28 13:56 ` [PATCH 5/7] net/enetfec: " David Marchand
2025-11-28 14:00   ` Hemant Agrawal
2025-11-28 13:56 ` [PATCH 6/7] net/memif: fix const pointer in socket check David Marchand
2025-11-28 13:56 ` David Marchand [this message]

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=20251128135616.2662164-8-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=mtahhan@redhat.com \
    --cc=reshma.pattan@intel.com \
    --cc=romanx.korynkevych@intel.com \
    --cc=stable@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).