summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-17 12:49:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-17 12:49:16 +0000
commitd51f0dde89d8fa7863df42da730cecd7e167f202 (patch)
tree815e25825cd26df5a4ce47bd4667e8b04f552a86 /ext
parent29736fab4072e1ab85b80150a6e126a8384f21e3 (diff)
bug_reporter.c: suppress warnings
* ext/-test-/bug_reporter/bug_reporter.c (sample_bug_reporter): cast via uintptr_t to suppress warning cast between pointer and different size integer by gcc 4.8. * ext/-test-/bug_reporter/bug_reporter.c (register_sample_bug_reporter): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/-test-/bug_reporter/bug_reporter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/-test-/bug_reporter/bug_reporter.c b/ext/-test-/bug_reporter/bug_reporter.c
index 1ca9d02..e9ea9e3 100644
--- a/ext/-test-/bug_reporter/bug_reporter.c
+++ b/ext/-test-/bug_reporter/bug_reporter.c
@@ -6,14 +6,14 @@ int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
static void
sample_bug_reporter(FILE *out, void *ptr)
{
- int n = (int)ptr;
+ int n = (int)(uintptr_t)ptr;
fprintf(out, "Sample bug reporter: %d\n", n);
}
static VALUE
register_sample_bug_reporter(VALUE self, VALUE obj)
{
- rb_bug_reporter_add(sample_bug_reporter, (void *)NUM2INT(obj));
+ rb_bug_reporter_add(sample_bug_reporter, (void *)(uintptr_t)NUM2INT(obj));
return Qnil;
}