diff mbox series

Fix typecast warning with clang

Message ID 20241219032709.4173094-1-raj.khem@gmail.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Fix typecast warning with clang | expand

Commit Message

Khem Raj Dec. 19, 2024, 3:27 a.m. UTC
Fixes
file.c:200:8: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Benjamin Coddington <bcodding@redhat.com>
Cc: Steve Dickson <steved@redhat.com>
---
 support/nsm/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/support/nsm/file.c b/support/nsm/file.c
index de122b0..0fa6164 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++;