From cefcc0426613cc761373e785980c87c77f8a8cb5 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Fri, 23 May 2014 21:33:43 +0000 Subject: "const correctness" cleanup added the following default flags: -Wformat -Wformat-security -Wmultichar -Wwrite-strings fixed several other warnings --- src/proxy/proxytrack.h | 4 ++-- src/proxy/store.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/proxy') diff --git a/src/proxy/proxytrack.h b/src/proxy/proxytrack.h index 6936218..6e4f755 100644 --- a/src/proxy/proxytrack.h +++ b/src/proxy/proxytrack.h @@ -109,8 +109,8 @@ HTS_UNUSED static void proxytrack_print_log(const char *severity, const char *fo "\r\n" \ "\r\n" -HTS_UNUSED static char *gethomedir(void) { - char *home = getenv("HOME"); +HTS_UNUSED static const char *gethomedir(void) { + const char *home = getenv("HOME"); if (home) return home; diff --git a/src/proxy/store.c b/src/proxy/store.c index daa9952..76f245a 100644 --- a/src/proxy/store.c +++ b/src/proxy/store.c @@ -1253,7 +1253,7 @@ static int PT_SaveCache__New_Fun(void *arg, const char *url, PT_Element element) headersSize = 0; /* */ { - char *message; + const char *message; if (strlen(element->msg) < 32) { message = element->msg; -- cgit v1.2.3