mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-27 09:29:06 +08:00
compiler.h: need to cast a (void *) to (char *) before adding
In the implementation of mempcpy(): Doing arithmetic on (void *) isn't permitted, so we need to cast it to (char *); it then get automatically converted to void * by the return. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
a162092532
commit
38a96f0e06
@ -223,7 +223,7 @@ size_t strnlen(const char *s, size_t maxlen);
|
||||
#ifndef HAVE_MEMPCPY
|
||||
static inline void *mempcpy(void *dst, const void *src, size_t n)
|
||||
{
|
||||
return memcpy(dst, src, n) + n;
|
||||
return (char *)memcpy(dst, src, n) + n;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user