I have the following piece of code:
typedef struct Folder{
void (**vtable)();
struct Set *ns;
}Folder;
Node *newFolder(char *n,struct Set *ns);
When I compile this file, it gives me:
passing argument to parameter 'ns' here
Node *newFolder(char *n,struct Set *ns);
Here is my test unit for this:
void testFolderNrNodes(CuTest *tc) {
Node_reset();
Node* folder = newFolder("folder_to_test", SetNil());
CuAssertIntEquals(tc, 1, nrNodes(folder));
}
which gives me this error:
incompatible integer to pointer conversion passing 'int' to parameter of type
'struct Set *' [-Wint-conversion]
Node* folder = newFolder("folder_to_test", SetNil());
^~~~~~~~
I don't see what the problem is. Does it come from the struct Set *ns
? Why do I get this message with "incompatible integer to pointer conversion passing 'int' to parameter of type 'struct Set *"
?
Can someone please let me know what I am doing wrong?