summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-17 00:12:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-17 00:12:30 +0000
commit71ebbe334deb7f56b393f21d482a6944abdd6e12 (patch)
treeebaa80d59d2f8073b6c4fff19942161e0e8a0e8e /lib
parentaf68619a6c0de0d4f08d092d65143abcf2cedce3 (diff)
mkmf.rb: suppress warnings
* lib/mkmf.rb (try_func, try_var): suppress unused-but-set-variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 0d19562db6..78521d3875 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -768,7 +768,7 @@ int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const
/*top*/
extern int t(void);
#{MAIN_DOES_NOTHING 't'}
-int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; }
+int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return !p; }
SRC
call && try_link(<<"SRC", opt, &b)
#{headers}
@@ -787,7 +787,7 @@ SRC
/*top*/
extern int t(void);
#{MAIN_DOES_NOTHING 't'}
-int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return 0; }
+int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return !p; }
SRC
end