From a072c63fe84ec17acc34cdb2e0baed13888f1913 Mon Sep 17 00:00:00 2001 From: tg Date: Wed, 8 May 2013 11:16:19 +0000 Subject: [PATCH] declare thiswillneverbedefinedIhope to silence some configure time warnings --- Build.sh | 10 ++++++++-- sh.h | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Build.sh b/Build.sh index c9d511f..aab5f63 100644 --- a/Build.sh +++ b/Build.sh @@ -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 diff --git a/sh.h b/sh.h index 569d33b..1fa935f 100644 --- a/sh.h +++ b/sh.h @@ -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) {