function pointer to memcpy

closed account (GLyURXSz)
I have a function point that i want to initialize with memcpy
void (*op)(const void*, const void*, int) = memcpy;

but i get this warning:

[seif@seif /tmp ]$ gcc test.c -o test
test.c:28: warning: initialization from incompatible pointer type

Is there anybody has a solution
Solution: respect the prototype.
void* memcpy(void *dest, const void *src, size_t n);
Last edited on
closed account (GLyURXSz)
thank you for the useful tip
Topic archived. No new replies allowed.