From va_*
's man page:
If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.
If you want to use a variable parameter list, you need to devise some sort of terminator for the list (e.g., always add a dummy NULL argument):
find (word, NULL);
find (word, filename, NULL);
or supply the number of parameter as parameter:
find (1, word);
find (2, word, filename);