summaryrefslogtreecommitdiff
path: root/src/htsserver.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-23 21:33:43 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-23 21:33:43 +0000
commitcefcc0426613cc761373e785980c87c77f8a8cb5 (patch)
treee64653268bcb93fc50bf23d22e38799c5bb31adc /src/htsserver.h
parent6ba50a2001bcfa1b467f69985a002fc064d8c807 (diff)
"const correctness" cleanup
added the following default flags: -Wformat -Wformat-security -Wmultichar -Wwrite-strings fixed several other warnings
Diffstat (limited to 'src/htsserver.h')
-rw-r--r--src/htsserver.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/htsserver.h b/src/htsserver.h
index 3690bce..7daeec0 100644
--- a/src/htsserver.h
+++ b/src/htsserver.h
@@ -100,7 +100,7 @@ int htslang_uninit(void);
/* Static definitions */
-HTS_UNUSED static char *gethomedir(void);
+HTS_UNUSED static const char *gethomedir(void);
HTS_UNUSED static int linput_cpp(FILE * fp, char *s, int max);
HTS_UNUSED static int linput_trim(FILE * fp, char *s, int max);
HTS_UNUSED static int fexist(const char *s);
@@ -163,8 +163,8 @@ HTS_UNUSED static int linputsoc_t(T_SOC soc, char *s, int max, int timeout) {
return -1;
}
-static char *gethomedir(void) {
- char *home = getenv("HOME");
+static const char *gethomedir(void) {
+ const char *home = getenv("HOME");
if (home)
return home;
@@ -267,11 +267,11 @@ static int ehexh(char c) {
return 0;
}
-static int ehex(char *s) {
+static int ehex(const char *s) {
return 16 * ehexh(*s) + ehexh(*(s + 1));
}
-HTS_UNUSED static void unescapehttp(char *s, String * tempo) {
+HTS_UNUSED static void unescapehttp(const char *s, String * tempo) {
size_t i;
for(i = 0; s[i] != '\0'; i++) {