diff --git a/lib/nspath.c b/lib/nspath.c index 9f7f11e6..c59afc2e 100644 --- a/lib/nspath.c +++ b/lib/nspath.c @@ -29,7 +29,7 @@ static inline int path_components(const char *path) int comps = 1; if (!path) return 0; - for (slash = strchr(path, '/'); slash; slash = strchr(slash + 1, '/')) + for (slash = (char *)strchr(path, '/'); slash; slash = strchr(slash + 1, '/')) comps++; return comps; } diff --git a/src/naemon/checks.c b/src/naemon/checks.c index b33fa4a3..aa28833b 100644 --- a/src/naemon/checks.c +++ b/src/naemon/checks.c @@ -111,7 +111,7 @@ struct check_output *parse_output(const char *buf, struct check_output *check_ou perf_data_string = g_string_new(NULL); tmp = strtok_r(tmpbuf, "\n", &saveptr); if (tmp != NULL) { - p = strpbrk((const char *) tmp, "|"); + p = (char *)strpbrk((const char *) tmp, "|"); } if (p == NULL) { /* No perfdata in first line of output. */ @@ -138,7 +138,7 @@ struct check_output *parse_output(const char *buf, struct check_output *check_ou if ((tmp = strtok_r(NULL, "", &saveptr))) { /* Is there a perf data delimiter somewhere in the long output? */ - p = strpbrk((const char *) tmp, "|"); + p = (char *)strpbrk((const char *) tmp, "|"); if (p == NULL) { /* No more perfdata, rest is long output*/ check_output->long_output = nm_strdup(tmp); diff --git a/src/naemon/objects_command.c b/src/naemon/objects_command.c index 7c9d0b4d..90975f4a 100644 --- a/src/naemon/objects_command.c +++ b/src/naemon/objects_command.c @@ -97,7 +97,7 @@ command *find_bang_command(const char *name) if (!name) return NULL; - bang = strchr(name, '!'); + bang = (char *)strchr(name, '!'); if (!bang) return find_command(name); *bang = 0; diff --git a/src/naemon/workers.c b/src/naemon/workers.c index d9a0ffbd..d6da573a 100644 --- a/src/naemon/workers.c +++ b/src/naemon/workers.c @@ -110,7 +110,7 @@ static struct wproc_list *get_wproc_list(const char *cmd) return &workers; /* first, look for a specialized worker for this command */ - if ((space = strchr(cmd, ' ')) != NULL) { + if ((space = (char *)strchr(cmd, ' ')) != NULL) { int namelen = (unsigned long)space - (unsigned long)cmd; cmd_name = nm_calloc(1, namelen + 1); memcpy(cmd_name, cmd, namelen);