Compilers that don't know that elog(ERROR) doesn't return complained
that this function might fail to return a value. Per buildfarm.
While at it, const-ify the function's declaration, since the intent
is evidently to always return a constant string.
static Oid lookup_index_am_handler_func(List *handler_name, char amtype);
-static char *get_am_type_string(char amtype);
+static const char *get_am_type_string(char amtype);
/*
}
/*
- * Convert single charater access method type into string for error reporting.
+ * Convert single-character access method type into string for error reporting.
*/
-static char *
+static const char *
get_am_type_string(char amtype)
{
switch (amtype)
default:
/* shouldn't happen */
elog(ERROR, "invalid access method type '%c'", amtype);
+ return NULL; /* keep compiler quiet */
}
}