Fix build with Clang

This fixes #313.
This commit is contained in:
Martin Wilke 2019-07-24 01:26:44 +08:00 committed by William Hubbs
parent c092ff6da1
commit 7ddc281ab6
6 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@
* except according to the terms contained in the LICENSE file.
*/
const char libeinfo_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
static const char libeinfo_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
#include <sys/types.h>
#include <sys/ioctl.h>

View File

@ -611,7 +611,7 @@ rc_service_daemons_crashed(const char *service)
i = 0;
TAILQ_FOREACH(s, list, entries)
argv[i++] = s->value;
argv[i] = '\0';
argv[i] = NULL;
}
}

View File

@ -15,7 +15,7 @@
* except according to the terms contained in the LICENSE file.
*/
const char librc_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
static const char librc_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
#include "queue.h"
#include "librc.h"

View File

@ -35,9 +35,9 @@
const char *applet = NULL;
static int syslog_decode(char *name, CODE *codetab)
static int syslog_decode(char *name, const CODE *codetab)
{
CODE *c;
const CODE *c;
if (isdigit((unsigned char)*name))
return atoi(name);

View File

@ -20,7 +20,7 @@
* except according to the terms contained in the LICENSE file.
*/
const char rc_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
static const char rc_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
#include <sys/types.h>
#include <sys/ioctl.h>

View File

@ -669,7 +669,7 @@ int main(int argc, char **argv)
nav[len++] = p;
for (i = 0; i < opt; i++)
nav[i + len] = argv[i];
nav[i + len] = '\0';
nav[i + len] = NULL;
}
}
}