From c0d47d945cd873682be6b2486d0ca93b67ec2da3 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 11 Oct 2010 20:15:13 +0200 Subject: [PATCH] client/mysql.c: fixed compiler warning --- src/client/mysql.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/mysql.c b/src/client/mysql.c index 02df51e..5c741ab 100644 --- a/src/client/mysql.c +++ b/src/client/mysql.c @@ -44,8 +44,8 @@ static dictionary *config = NULL; /* * Converts error codes to string */ -static char *client_error(int error) { - +static const char* client_error(int error) { + switch (error) { case 1: return "Missing 'host' in configuration"; @@ -97,7 +97,7 @@ static void clean_exit(int excode) { /* Clean mysql */ int status = client_exit(); if (0 != status) { - char *str = client_error(status); + const char *str = client_error(status); fprintf(stderr,"%s", str); } @@ -362,7 +362,7 @@ static void main_loop() { } } -int main(int argc, char** argv) { +int main(int argc, char **argv) { /* Return value */ int ret;