The "const void *" in the search function can't be directly assigned to
the "const char (*)[5]" variable, due to the differently-qualified
pointer target types. Let's just cast off that qualifier, shall we?
static int compar_5arr(const void *key, const void *elem_)
{
static int compar_5arr(const void *key, const void *elem_)
{
- const char (*elem)[5] = elem_;
+ const char (*elem)[5] = (void *)elem_;
return strncmp(key, *elem, sizeof *elem);
}
return strncmp(key, *elem, sizeof *elem);
}