From 0df0b25d95ac2310cc98ae44c9b8f64c3fb592d6 Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sun, 5 Feb 2017 16:58:17 +0100 Subject: [PATCH] mcstrans: fix -Wwrite-strings warnings Signed-off-by: Nicolas Iooss --- mcstrans/src/mcscolor.c | 2 +- mcstrans/src/mcstransd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mcstrans/src/mcscolor.c b/mcstrans/src/mcscolor.c index 558c2a0e..e713da9a 100644 --- a/mcstrans/src/mcscolor.c +++ b/mcstrans/src/mcscolor.c @@ -38,7 +38,7 @@ typedef struct setab { #define N_COLOR 4 #define AUX_RULE_COLOR "color" -static char *rules[] = { "user", "role", "type", "range" }; +static const char *rules[] = { "user", "role", "type", "range" }; static setab_t *clist[N_COLOR]; static setab_t *cend[N_COLOR]; diff --git a/mcstrans/src/mcstransd.c b/mcstrans/src/mcstransd.c index a5ed3618..d7fc5dea 100644 --- a/mcstrans/src/mcstransd.c +++ b/mcstrans/src/mcstransd.c @@ -90,7 +90,7 @@ send_response(int fd, uint32_t function, char *data, int32_t ret_val) ssize_t count; if (!data) - data = ""; + data = (char *)""; data_size = strlen(data) + 1;