From 33749e8379b3fbab6bcc8faa6d74139cc96e4a71 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 18 Dec 2011 11:54:57 +0000 Subject: [PATCH] ensure we got long ints in ruby printfs git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2246 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/bindings/ruby/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/bindings/ruby/main.c b/program/bindings/ruby/main.c index 445eae3d..5096eef9 100644 --- a/program/bindings/ruby/main.c +++ b/program/bindings/ruby/main.c @@ -51,13 +51,13 @@ string_arr string_arr_new( a.strings[i + 1] = strdup(StringValuePtr(v)); break; case T_FIXNUM: - snprintf(buf, 63, "%d", FIX2INT(v)); + snprintf(buf, 63, "%ld", (long)FIX2INT(v)); a.strings[i + 1] = strdup(buf); break; default: rb_raise(rb_eTypeError, - "invalid argument - %s, expected T_STRING or T_FIXNUM on index %d", - rb_class2name(CLASS_OF(v)), i); + "invalid argument - %s, expected T_STRING or T_FIXNUM on index %ld", + (long)rb_class2name(CLASS_OF(v)), i); break; } } -- 2.30.2