[PATCH v2] Fix typecast warning with clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Cc: Benjamin Coddington <bcodding@xxxxxxxxxx>
Cc: Steve Dickson <steved@xxxxxxxxxx>
---
v2: Make base as const char pointer insread of trying type punning

 support/nsm/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/nsm/file.c b/support/nsm/file.c
index de122b0f..68f99bf0 100644
--- a/support/nsm/file.c
+++ b/support/nsm/file.c
@@ -184,7 +184,8 @@ static char *
 nsm_make_temp_pathname(const char *pathname)
 {
 	size_t size;
-	char *path, *base;
+	char *path;
+	const char *base;
 	int len;
 
 	size = strlen(pathname) + sizeof(".new") + 1;




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux