Generic linked-list library in C
void* is the standard to implement such generics in C. The trouble with union is that the end-user cannot put their own types/structs in it. With void * a pointer to a user-defined struct can be used. However, be careful about memory leaks!

The warnings you are getting is because you haven't consistently used void*. 

llist.c:262:3: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘void *’


This indicates that you are printf'ing the data as if it were an int. But you don't what it is so you can't do that. Either don't provide printing options or provide a way to control how the object prints.

llist.c:27:7: note: expected ‘void *’ but argument is of type ‘int’


You have a void * and you are passing it to a function that takes int. Everything inside your library should be using void * not int. Only the actual code using your library should conver the void * into int or whatever they are using.