ruby-changes:33623
From: naruse <ko1@a...>
Date: Thu, 24 Apr 2014 17:47:01 +0900 (JST)
Subject: [ruby-changes:33623] naruse:r45704 (trunk): * file.c (statfs_inspect): suppress warnings.
naruse 2014-04-24 17:46:56 +0900 (Thu, 24 Apr 2014) New Revision: 45704 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45704 Log: * file.c (statfs_inspect): suppress warnings. assume those values won't be larger than LONG_LONG_MAX. Modified files: trunk/ChangeLog trunk/file.c Index: ChangeLog =================================================================== --- ChangeLog (revision 45703) +++ ChangeLog (revision 45704) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Apr 24 17:39:53 2014 NARUSE, Yui <naruse@r...> + + * file.c (statfs_inspect): suppress warnings. + assume those values won't be larger than LONG_LONG_MAX. + Thu Apr 24 11:53:28 2014 Nobuyoshi Nakada <nobu@r...> * ext/openssl/ossl_asn1.c (ossl_asn1_initialize): SYMID on a value Index: file.c =================================================================== --- file.c (revision 45703) +++ file.c (revision 45704) @@ -5570,7 +5570,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/file.c#L5570 statfs_inspect(VALUE self) { struct statfs*st = get_statfs(self); - return rb_sprintf("#<%"PRIsVALUE" type=%d" + return rb_sprintf("#<%"PRIsVALUE" type=%ld" #ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME "(%s)" #endif @@ -5578,13 +5578,13 @@ statfs_inspect(VALUE self) https://github.com/ruby/ruby/blob/trunk/file.c#L5578 ", blocks=%"PRI_LL_PREFIX"d/%"PRI_LL_PREFIX"d/%"PRI_LL_PREFIX"d" ", files=%"PRI_LL_PREFIX"d/%"PRI_LL_PREFIX"d" ">", - rb_obj_class(self), st->f_type, + rb_obj_class(self), (long)st->f_type, #ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME st->f_fstypename, #endif (long)st->f_bsize, - st->f_bavail, st->f_bfree, st->f_blocks, - st->f_ffree, st->f_files); + (LONG_LONG)st->f_bavail, (LONG_LONG)st->f_bfree, (LONG_LONG)st->f_blocks, + (LONG_LONG)st->f_ffree, (LONG_LONG)st->f_files); } #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/