From b6da0fca774d229c4776e41d019373d1ec0df7ab Mon Sep 17 00:00:00 2001 From: kris Date: Tue, 17 Apr 2001 07:46:38 +0000 Subject: -Wnon-const-format sweep: make format strings const char *'s, add __printflike()/__printf0like() to function prototypes, as appropriate. Reviewed by: bde, -audit --- bin/sh/error.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/sh/error.c') diff --git a/bin/sh/error.c b/bin/sh/error.c index e079699..0407bac 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -70,7 +70,7 @@ volatile sig_atomic_t intpending; char *commandname; -static void exverror __P((int, char *, va_list)); +static void exverror __P((int, const char *, va_list)) __printf0like(2, 0); /* * Called to raise an exception. Since C doesn't include exceptions, we @@ -141,7 +141,7 @@ onint() { static void exverror(cond, msg, ap) int cond; - char *msg; + const char *msg; va_list ap; { CLEAR_PENDING_INT; @@ -166,7 +166,7 @@ exverror(cond, msg, ap) #ifdef __STDC__ void -error(char *msg, ...) +error(const char *msg, ...) #else void error(va_alist) @@ -174,7 +174,7 @@ error(va_alist) #endif { #ifndef __STDC__ - char *msg; + const char *msg; #endif va_list ap; #ifdef __STDC__ @@ -190,7 +190,7 @@ error(va_alist) #ifdef __STDC__ void -exerror(int cond, char *msg, ...) +exerror(int cond, const char *msg, ...) #else void exerror(va_alist) -- cgit v1.1