Fix some compiler warnings
librc: Fix C90 warning (mixed declaration and code) rc: Fix warning about discarding const qualifier Fixes #45.
This commit is contained in:
parent
c1faafcad8
commit
f085ae400c
@ -510,6 +510,8 @@ rc_service_daemons_crashed(const char *service)
|
|||||||
RC_STRINGLIST *list = NULL;
|
RC_STRINGLIST *list = NULL;
|
||||||
RC_STRING *s;
|
RC_STRING *s;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
char *ch_root;
|
||||||
|
char *spidfile;
|
||||||
|
|
||||||
path += snprintf(dirpath, sizeof(dirpath), RC_SVCDIR "/daemons/%s",
|
path += snprintf(dirpath, sizeof(dirpath), RC_SVCDIR "/daemons/%s",
|
||||||
basename_c(service));
|
basename_c(service));
|
||||||
@ -554,8 +556,8 @@ rc_service_daemons_crashed(const char *service)
|
|||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
char *ch_root = rc_service_value_get(basename_c(service), "chroot");
|
ch_root = rc_service_value_get(basename_c(service), "chroot");
|
||||||
char *spidfile = pidfile;
|
spidfile = pidfile;
|
||||||
if (ch_root && pidfile) {
|
if (ch_root && pidfile) {
|
||||||
spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1);
|
spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1);
|
||||||
strcpy(spidfile, ch_root);
|
strcpy(spidfile, ch_root);
|
||||||
|
@ -519,7 +519,7 @@ runlevel_config(const char *service, const char *level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_stop_services(const RC_STRINGLIST *types_n, const RC_STRINGLIST *start_services,
|
do_stop_services(RC_STRINGLIST *types_n, RC_STRINGLIST *start_services,
|
||||||
const RC_STRINGLIST *stop_services, const RC_DEPTREE *deptree,
|
const RC_STRINGLIST *stop_services, const RC_DEPTREE *deptree,
|
||||||
const char *newlevel, bool parallel, bool going_down)
|
const char *newlevel, bool parallel, bool going_down)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user