summaryrefslogtreecommitdiffstats
path: root/sbin/init
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-08-19 08:19:37 +0000
committerkris <kris@FreeBSD.org>2001-08-19 08:19:37 +0000
commit5e75b336b9d01ea2b70ff9f4098ca7e54f86975a (patch)
treec307dda030341761eafafb3d34259ed800c35e94 /sbin/init
parent0bbccbf2dc9057e56f7233044f08c4b59f4f3e30 (diff)
downloadFreeBSD-src-5e75b336b9d01ea2b70ff9f4098ca7e54f86975a.zip
FreeBSD-src-5e75b336b9d01ea2b70ff9f4098ca7e54f86975a.tar.gz
Silence non-constant format string warnings by marking functions
as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
Diffstat (limited to 'sbin/init')
-rw-r--r--sbin/init/init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 81fe85e..b59f288 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -104,9 +104,9 @@ static const char rcsid[] =
void handle __P((sig_t, ...));
void delset __P((sigset_t *, ...));
-void stall __P((char *, ...));
-void warning __P((char *, ...));
-void emergency __P((char *, ...));
+void stall __P((const char *, ...)) __printflike(1, 2);
+void warning __P((const char *, ...)) __printflike(1, 2);
+void emergency __P((const char *, ...)) __printflike(1, 2);
void disaster __P((int));
void badsys __P((int));
int runshutdown __P((void));
@@ -412,7 +412,7 @@ delset(va_alist)
*/
void
#ifdef __STDC__
-stall(char *message, ...)
+stall(const char *message, ...)
#else
stall(va_alist)
va_dcl
@@ -420,7 +420,7 @@ stall(va_alist)
{
va_list ap;
#ifndef __STDC__
- char *message;
+ const char *message;
va_start(ap);
message = va_arg(ap, char *);
@@ -440,7 +440,7 @@ stall(va_alist)
*/
void
#ifdef __STDC__
-warning(char *message, ...)
+warning(const char *message, ...)
#else
warning(va_alist)
va_dcl
@@ -448,7 +448,7 @@ warning(va_alist)
{
va_list ap;
#ifndef __STDC__
- char *message;
+ const char *message;
va_start(ap);
message = va_arg(ap, char *);
@@ -466,7 +466,7 @@ warning(va_alist)
*/
void
#ifdef __STDC__
-emergency(char *message, ...)
+emergency(const char *message, ...)
#else
emergency(va_alist)
va_dcl
@@ -474,7 +474,7 @@ emergency(va_alist)
{
va_list ap;
#ifndef __STDC__
- char *message;
+ const char *message;
va_start(ap);
message = va_arg(ap, char *);
OpenPOWER on IntegriCloud