The MidnightBSD/amd64 system compiler (Target: amd64-undermydesk-freebsd)

gcc version 4.2.1 20070719  [MidnightBSD] has stricter -Wformat checking
This commit is contained in:
tg 2012-11-30 19:51:25 +00:00
parent 77c4cb88e4
commit 9a6ebef8ca
2 changed files with 6 additions and 6 deletions

4
main.c
View File

@ -34,7 +34,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.243 2012/11/30 19:25:04 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.244 2012/11/30 19:51:24 tg Exp $");
extern char **environ;
@ -1135,7 +1135,7 @@ static void vwarningf(unsigned int, const char *, va_list)
static void
vwarningf(unsigned int flags, const char *fmt, va_list ap)
{
if (fmt) {
if (*fmt) {
if (flags & VWARNINGF_INTERNAL)
shf_fprintf(shl_out, "internal error: ");
if (flags & VWARNINGF_ERRORPREFIX)

8
sh.h
View File

@ -157,7 +157,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.605 2012/11/30 19:25:06 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.606 2012/11/30 19:51:25 tg Exp $");
#endif
#define MKSH_VERSION "R41 2012/11/30"
@ -1829,9 +1829,9 @@ void warningf(bool, const char *, ...)
MKSH_A_FORMAT(__printf__, 2, 3);
void bi_errorf(const char *, ...)
MKSH_A_FORMAT(__printf__, 1, 2);
#define errorfz() errorf(NULL)
#define errorfxz(rc) errorfx((rc), NULL)
#define bi_errorfz() bi_errorf(NULL)
#define errorfz() errorf(null)
#define errorfxz(rc) errorfx((rc), null)
#define bi_errorfz() bi_errorf(null)
void internal_errorf(const char *, ...)
MKSH_A_NORETURN
MKSH_A_FORMAT(__printf__, 1, 2);