public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nsm_make_temp_pathname: Removed A Warning
@ 2025-01-03 13:46 Steve Dickson
  2025-01-03 18:31 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2025-01-03 13:46 UTC (permalink / raw)
  To: Linux NFS Mailing list

file.c:200:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/nsm/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/nsm/file.c b/support/nsm/file.c
index de122b0f..8d4ab9a9 100644
--- a/support/nsm/file.c
+++ b/support/nsm/file.c
@@ -197,7 +197,7 @@ nsm_make_temp_pathname(const char *pathname)
 
 	base = strrchr(pathname, '/');
 	if (base == NULL)
-		base = pathname;
+		base = (char *)pathname;
 	else
 		base++;
 
-- 
2.47.1


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

* Re: [PATCH] nsm_make_temp_pathname: Removed A Warning
  2025-01-03 13:46 [PATCH] nsm_make_temp_pathname: Removed A Warning Steve Dickson
@ 2025-01-03 18:31 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2025-01-03 18:31 UTC (permalink / raw)
  To: Linux NFS Mailing list



On 1/3/25 8:46 AM, Steve Dickson wrote:
> file.c:200:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
>   support/nsm/file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/nsm/file.c b/support/nsm/file.c
> index de122b0f..8d4ab9a9 100644
> --- a/support/nsm/file.c
> +++ b/support/nsm/file.c
> @@ -197,7 +197,7 @@ nsm_make_temp_pathname(const char *pathname)
>   
>   	base = strrchr(pathname, '/');
>   	if (base == NULL)
> -		base = pathname;
> +		base = (char *)pathname;
>   	else
>   		base++;
>   
NAK... to previous patches fix this problem.

steved.


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

end of thread, other threads:[~2025-01-03 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 13:46 [PATCH] nsm_make_temp_pathname: Removed A Warning Steve Dickson
2025-01-03 18:31 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox