summaryrefslogtreecommitdiffstats
path: root/bin/sh/error.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-04-17 07:46:38 +0000
committerkris <kris@FreeBSD.org>2001-04-17 07:46:38 +0000
commitb6da0fca774d229c4776e41d019373d1ec0df7ab (patch)
tree90405fcc57a8301012105d9d0facc3ded561a0f6 /bin/sh/error.c
parent9acb56a18a243e153f49b5fc26f3b3050492b013 (diff)
downloadFreeBSD-src-b6da0fca774d229c4776e41d019373d1ec0df7ab.zip
FreeBSD-src-b6da0fca774d229c4776e41d019373d1ec0df7ab.tar.gz
-Wnon-const-format sweep: make format strings const char *'s, add
__printflike()/__printf0like() to function prototypes, as appropriate. Reviewed by: bde, -audit
Diffstat (limited to 'bin/sh/error.c')
-rw-r--r--bin/sh/error.c10
1 files changed, 5 insertions, 5 deletions
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)
OpenPOWER on IntegriCloud