From 05d842777d795725f9228249bb9c2ad6acf14308 Mon Sep 17 00:00:00 2001 From: Wincent Colaiuta Date: Sun, 6 Dec 2009 14:31:30 +0100 Subject: [PATCH] Silence warning compiling against Ruby 1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Silence this warning: mkdtemp.c:52: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’ Signed-off-by: Wincent Colaiuta --- ext/mkdtemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mkdtemp.c b/ext/mkdtemp.c index c334a19..cdf823b 100644 --- a/ext/mkdtemp.c +++ b/ext/mkdtemp.c @@ -49,7 +49,7 @@ static VALUE dir_mkdtemp_m(int argc, VALUE *argv, VALUE self) /* create temporary storage */ c_template = malloc(RSTRING_LEN(template) + 1); if (!c_template) - rb_raise(rb_eNoMemError, "failed to allocate %d bytes of template storage", RSTRING_LEN(template) + 1); + rb_raise(rb_eNoMemError, "failed to allocate %ld bytes of template storage", RSTRING_LEN(template) + 1); strncpy(c_template, RSTRING_PTR(template), RSTRING_LEN(template)); c_template[RSTRING_LEN(template)] = 0; /* NUL-terminate */ -- 2.37.1