[PATCH] examples/vm_power_manager: fix const discarding
Thomas Monjalon
thomas at monjalon.net
Wed Apr 8 20:18:33 CEST 2026
01/04/2026 11:35, Thomas Monjalon:
> When compiling with GCC 15.2.1, a const qualifier issue
> is seen with this warning:
>
> In function 'get_resource_name_from_chn_path':
> examples/vm_power_manager/channel_monitor.c:139:16:
> error: assignment discards 'const' qualifier from pointer target type
> 139 | substr = strstr(channel_path, CHANNEL_MGR_FIFO_PATTERN_NAME);
> | ^
>
> The function get_resource_name_from_chn_path is used only once
> and call a single function (strstr),
> so it can be replaced with a direct call to strstr().
>
> Fixes: 221e7026d521 ("examples/power: add FIFO per core for JSON interface")
> Cc: stable at dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Applied to fix building with a recent GCC.
More information about the stable
mailing list