• we had an unused variable leftover
• make warning-free for both gcc and xlC
This commit is contained in:
14
sh.h
14
sh.h
@@ -8,7 +8,7 @@
|
||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.160 2007/07/22 13:46:15 tg Exp $"
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.161 2007/07/22 14:01:50 tg Exp $"
|
||||
#define MKSH_VERSION "R30 2007/07/22"
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
@@ -1338,6 +1338,18 @@ void warningf(bool, const char *, ...)
|
||||
__attribute__((format (printf, 2, 3)));
|
||||
void bi_errorf(const char *, ...)
|
||||
__attribute__((format (printf, 1, 2)));
|
||||
/*
|
||||
* circumvent compiler format string nonnull checking
|
||||
* we teach xlC to not bitch about zero-lengths, want
|
||||
* gcc to do it, and so gain double-checking benefits
|
||||
*/
|
||||
#if defined(__xlC__)
|
||||
#define errorfz() errorf("")
|
||||
#define bi_errorfz() bi_errorf("")
|
||||
#else
|
||||
#define errorfz() errorf(null)
|
||||
#define bi_errorfz() bi_errorf(null)
|
||||
#endif
|
||||
void internal_errorf(const char *, ...)
|
||||
__attribute__((noreturn))
|
||||
__attribute__((format (printf, 1, 2)));
|
||||
|
Reference in New Issue
Block a user