From 09d4be59b52ded308baa9ff3621e124bcf3173b7 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Apr 2013 01:11:27 +0000 Subject: [PATCH] mkmf.rb: suppress warnings * lib/mkmf.rb (try_func, try_var, scalar_ptr_type, scalar_type): suppress implicit-function-declaration warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mkmf.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/mkmf.rb b/lib/mkmf.rb index da659bfc35..f55535990f 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -743,15 +743,15 @@ int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const #{headers} /*top*/ extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; } -#{MAIN_DOES_NOTHING "t"} SRC call && try_link(<<"SRC", opt, &b) #{headers} /*top*/ extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) { #{call}; return 0; } -#{MAIN_DOES_NOTHING "t"} SRC end @@ -762,8 +762,8 @@ SRC #{headers} /*top*/ extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return 0; } -#{MAIN_DOES_NOTHING "t"} SRC end @@ -1147,7 +1147,7 @@ SRC #{cpp_include(headers)} /*top*/ int s = (char *)&((#{type}*)0)->#{member} - (char *)0; -#{MAIN_DOES_NOTHING "s"} +#{MAIN_DOES_NOTHING} SRC $defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp)) $defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility @@ -1401,8 +1401,8 @@ SRC /*top*/ volatile #{type} conftestval; extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) {return (int)(1-*(conftestval#{member ? ".#{member}" : ""}));} -#{MAIN_DOES_NOTHING "t"} SRC end @@ -1414,8 +1414,8 @@ SRC /*top*/ volatile #{type} conftestval; extern int t(void); +#{MAIN_DOES_NOTHING 't'} int t(void) {return (int)(1-(conftestval#{member ? ".#{member}" : ""}));} -#{MAIN_DOES_NOTHING "t"} SRC end