Skip to contentSkip to conversation

Fix typecast warning with clang

PATCH Superseded Khem Raj 1 participant 1 message Dec 19, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 Fix typecast warning with clang

Fixes
file.c:200:8: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Cc Benjamin Coddington <[email protected]>
Cc Steve Dickson <[email protected]>
---
 support/nsm/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/nsm/file.c +1 -1
index de122b0..0fa6164 100644
@@ -197,7 +197,7 @@ nsm_make_temp_pathname(const char *pathname)
 
 	base = strrchr(pathname, '/');
 	if (base == NULL)
-		base = pathname;
+		base = (char*)pathname;
 	else
 		base++;