semodule_deps: hide -Wwrite-strings warnings

generate_requires() may use a non-freable strings, BASE_NAME, as key in
a hashtable. The compiler complains about this small abuse of
hashtab_insert() interface (because its argument key is char* without
"const"). Nevertheless this is all right because the hashtab keys are
never freed directly (this behavior is documented in a comment in
free_requires()).

Therefore, hide the compiler warning by casting BASE_NAME to char*.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2017-02-05 16:58:18 +01:00 committed by James Carter
parent 0df0b25d95
commit 9c770fe87e

View file

@ -40,7 +40,7 @@ extern int optind;
* thing is done in the linker for displaying error
* messages.
*/
#define BASE_NAME "BASE"
#define BASE_NAME ((char *)"BASE")
static void usage(char *program_name)
{