Clang issues a warning about what we are really intending to do. Use an
explicit type as argument to sizeof().
tracer.c:1152:28: warning: 'memcpy' call operates on objects of type 'const char' while the size is based on a different type 'const char *' [-Wsizeof-pointer-memaccess]
memcpy(&ptr, ptr, sizeof(ptr));
~~~ ^~~
tracer.c:1152:28: note: did you mean to provide an explicit length?
memcpy(&ptr, ptr, sizeof(ptr));
^~~
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
return ptr;
case SIDE_TYPE_GATHER_ACCESS_POINTER:
/* Dereference pointer */
- memcpy(&ptr, ptr, sizeof(ptr));
+ memcpy(&ptr, ptr, sizeof(const char *));
return ptr;
default:
abort();