Fix typecast warning with clang
Subsystems (2)
PATCH v2 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]
Signed-off-by Khem Raj <[email protected]>
Cc Benjamin Coddington <[email protected]>
Cc Steve Dickson <[email protected]>
---
v2: Make base as const char pointer insread of trying type punning
support/nsm/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
support/nsm/file.c +2 -1
@@ -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 ;
Quoted 6 lines · Khem Raj
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 <[email protected]>Cc Benjamin Coddington <[email protected]>Cc Steve Dickson <[email protected]>
Committed... (tag: nfs-utils-2-8-3-rc1)
steved.
Quoted 21 lines
---
v2: Make base as const char pointer insread of trying type punningsupport/nsm/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)support/nsm/file.c +2
-1@@ -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 ;