I have the following code:
/*
* Pointer to a function that reads a codesegment
*/
typedef bool (*BRCS)(void *, uint32, uint64 *, uint64 *, const char **, const char **);
BRCS get_prog_id;
/*
* 'get_prog_id' is loaded from a dynamic library
*/
uint64 start_o;
uint64 length_o;
char prog_id[256];
char err[256];
get_prog_id(NULL, 0, &start_o, &length_o, &prog_id, &err);
When I run my compiler, I get the following warnings:
passing argument 5 of get_prog_id from incompatible pointer type
passing argument 6 of get_prog_id from incompatible pointer type
So, it's complaining that I don't have char **
for my last two arguments.
I'm confused. My understanding was that the variable representing an array of TYPES
is equivalent to a pointer to a TYPE
. As such, applying the &
operator would give you a pointer to a pointer to a TYPE
.
What am I missing here?