diff mbox

[5/8] mcstrans: fix -Wwrite-strings warnings

Message ID 20170205155820.29157-5-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Nicolas Iooss Feb. 5, 2017, 3:58 p.m. UTC
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 mcstrans/src/mcscolor.c  | 2 +-
 mcstrans/src/mcstransd.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/mcstrans/src/mcscolor.c b/mcstrans/src/mcscolor.c
index 558c2a0efc4b..e713da9aea1f 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 a5ed36181fc6..d7fc5dea3dd3 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;