declare thiswillneverbedefinedIhope to silence some configure time warnings

This commit is contained in:
tg 2013-05-08 11:16:19 +00:00
parent f02f8afe6e
commit a072c63fe8
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.631 2013/05/05 13:38:00 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.632 2013/05/08 11:16:17 tg Exp $'
#-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013
@ -190,6 +190,7 @@ ac_testn() {
ac_ifcpp() {
expr=$1; shift
ac_testn "$@" <<-EOF
extern void thiswillneverbedefinedIhope(void);
int main(void) { return (
#$expr
0
@ -1290,6 +1291,7 @@ test $ct = pcc && phase=u
#
ac_test attribute_bounded '' 'for __attribute__((__bounded__))' <<-'EOF'
#if defined(__TenDRA__) || (defined(__GNUC__) && (__GNUC__ < 2))
extern void thiswillneverbedefinedIhope(void);
/* force a failure: TenDRA and gcc 1.42 have false positive here */
int main(void) { return (thiswillneverbedefinedIhope()); }
#else
@ -1310,6 +1312,7 @@ ac_test attribute_bounded '' 'for __attribute__((__bounded__))' <<-'EOF'
EOF
ac_test attribute_format '' 'for __attribute__((__format__))' <<-'EOF'
#if defined(__TenDRA__) || (defined(__GNUC__) && (__GNUC__ < 2))
extern void thiswillneverbedefinedIhope(void);
/* force a failure: TenDRA and gcc 1.42 have false positive here */
int main(void) { return (thiswillneverbedefinedIhope()); }
#else
@ -1324,6 +1327,7 @@ ac_test attribute_format '' 'for __attribute__((__format__))' <<-'EOF'
EOF
ac_test attribute_noreturn '' 'for __attribute__((__noreturn__))' <<-'EOF'
#if defined(__TenDRA__) || (defined(__GNUC__) && (__GNUC__ < 2))
extern void thiswillneverbedefinedIhope(void);
/* force a failure: TenDRA and gcc 1.42 have false positive here */
int main(void) { return (thiswillneverbedefinedIhope()); }
#else
@ -1336,6 +1340,7 @@ ac_test attribute_noreturn '' 'for __attribute__((__noreturn__))' <<-'EOF'
EOF
ac_test attribute_unused '' 'for __attribute__((__unused__))' <<-'EOF'
#if defined(__TenDRA__) || (defined(__GNUC__) && (__GNUC__ < 2))
extern void thiswillneverbedefinedIhope(void);
/* force a failure: TenDRA and gcc 1.42 have false positive here */
int main(void) { return (thiswillneverbedefinedIhope()); }
#else
@ -1345,6 +1350,7 @@ ac_test attribute_unused '' 'for __attribute__((__unused__))' <<-'EOF'
EOF
ac_test attribute_used '' 'for __attribute__((__used__))' <<-'EOF'
#if defined(__TenDRA__) || (defined(__GNUC__) && (__GNUC__ < 2))
extern void thiswillneverbedefinedIhope(void);
/* force a failure: TenDRA and gcc 1.42 have false positive here */
int main(void) { return (thiswillneverbedefinedIhope()); }
#else
@ -1531,7 +1537,7 @@ else
#define EXTERN
#define MKSH_INCLUDES_ONLY
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.631 2013/05/05 13:38:00 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.632 2013/05/08 11:16:17 tg Exp $");
int main(void) { printf("Hello, World!\n"); return (0); }
EOF
case $cm in

3
sh.h
View File

@ -164,7 +164,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.654 2013/05/02 21:59:52 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.655 2013/05/08 11:16:19 tg Exp $");
#endif
#define MKSH_VERSION "R46 2013/05/02"
@ -522,6 +522,7 @@ char *ucstrstr(char *, const char *);
#if (!defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)) || (MKSH_BUILD_R != 461)
#error Must run Build.sh to compile this.
extern void thiswillneverbedefinedIhope(void);
int
im_sorry_dave(void)
{