From a1c8b8d89f31cbf5ac4151ac65e9e6545e75713a Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 28 Jun 2014 09:16:51 +0200 Subject: [PATCH] For DOV: Cast input of some string macros --- macro.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macro.h b/macro.h index e4a2f2e..08c8a9b 100644 --- a/macro.h +++ b/macro.h @@ -13,7 +13,7 @@ /* safe strcpy/strncpy */ -#define SCPY(dst, src) scpy(dst, src, sizeof(dst)) +#define SCPY(dst, src) scpy((char *)dst, src, sizeof(dst)) static inline void scpy(char *dst, const char *src, unsigned int siz) { strncpy(dst, src, siz); @@ -22,7 +22,7 @@ static inline void scpy(char *dst, const char *src, unsigned int siz) /* safe strcat/strncat */ -#define SCAT(dst, src) scat(dst, src, sizeof(dst)) +#define SCAT(dst, src) scat((char *)dst, src, sizeof(dst)) static inline void scat(char *dst, const char *src, unsigned int siz) { strncat(dst, src, siz-strlen(dst)-1); @@ -31,7 +31,7 @@ static inline void scat(char *dst, const char *src, unsigned int siz) /* safe concat of a byte */ -#define SCCAT(dst, src) sccat(dst, src, sizeof(dst)) +#define SCCAT(dst, src) sccat((char *)dst, src, sizeof(dst)) static inline void sccat(char *dst, char chr, unsigned int siz) { if (strlen(dst) < siz-1) @@ -43,7 +43,7 @@ static inline void sccat(char *dst, char chr, unsigned int siz) /* safe sprintf/snprintf */ -#define SPRINT(dst, fmt, arg...) sprint(dst, sizeof(dst), fmt, ## arg) +#define SPRINT(dst, fmt, arg...) sprint((char *)dst, sizeof(dst), fmt, ## arg) static inline void sprint(char *dst, unsigned int siz, const char *fmt, ...) { va_list args; -- 2.13.6