From 4032c5da8473fc7d55e9a96471b697c62663c194 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Thu, 4 May 2017 20:19:10 +0200 Subject: tests/server: make string literals const assign string literals to const char * instead of char * in order to avoid a lot of these warnings: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] --- tests/server/tftpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/server/tftpd.c') diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index c8667437e..0cd00c799 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -208,7 +208,7 @@ static bool use_ipv6 = FALSE; static const char *ipv_inuse = "IPv4"; const char *serverlogfile = DEFAULT_LOGFILE; -static char *pidname= (char *)".tftpd.pid"; +static const char *pidname = ".tftpd.pid"; static int serverlogslocked = 0; static int wrotepidfile = 0; @@ -960,7 +960,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size) #ifdef USE_WINSOCK DWORD recvtimeout, recvtimeoutbak; #endif - char *option = (char *)"mode"; /* mode is implicit */ + const char *option = "mode"; /* mode is implicit */ int toggle = 1; /* Open request dump file. */ -- cgit v1.2.3