mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/bigdecimal/bigdecimal.c (VpMidRound): remove warnings.
patch from Charlie Savage. [ruby-core:22869] * ext/digest/bubblebabble/bubblebabble.c (bubblebabble_str_new): ditto. * ext/digest/digest.c (hexencode_str_new): ditto. * ext/iconv/iconv.c (iconv_convert): ditto. * ext/socket/socket.c (inspect_sockaddr): ditto. * ext/socket/raddrinfo.c (sockaddr_obj): ditto. * ext/syck/emitter.c (syck_emitter_write): ditto. * ext/syck/emitter.c (syck_emitter_flush): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b4a9962e85
commit
438b8706a7
9 changed files with 34 additions and 13 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
Fri Oct 16 13:20:39 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (VpMidRound): remove warnings.
|
||||
patch from Charlie Savage. [ruby-core:22869]
|
||||
|
||||
* ext/digest/bubblebabble/bubblebabble.c (bubblebabble_str_new): ditto.
|
||||
|
||||
* ext/digest/digest.c (hexencode_str_new): ditto.
|
||||
|
||||
* ext/iconv/iconv.c (iconv_convert): ditto.
|
||||
|
||||
* ext/socket/socket.c (inspect_sockaddr): ditto.
|
||||
|
||||
* ext/socket/raddrinfo.c (sockaddr_obj): ditto.
|
||||
|
||||
* ext/syck/emitter.c (syck_emitter_write): ditto.
|
||||
|
||||
* ext/syck/emitter.c (syck_emitter_flush): ditto.
|
||||
|
||||
* ext/syck/emitter.c (syck_emit_tag): ditto.
|
||||
|
||||
Fri Oct 16 12:03:31 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/csv.rb (CSV#raw_encoding): returns ASCII-8BIT when the io
|
||||
|
|
|
@ -4497,7 +4497,7 @@ VpMidRound(Real *y, int f, int nf)
|
|||
div = v/10;
|
||||
v = v - div*10;
|
||||
if (fracf == 0) {
|
||||
for(i=ix+1;i<y->Prec;i++) {
|
||||
for(i=ix+1;(U_LONG)i<y->Prec;i++) {
|
||||
if (y->frac[i]%BASE) {
|
||||
fracf = 1;
|
||||
break;
|
||||
|
|
|
@ -23,7 +23,7 @@ bubblebabble_str_new(VALUE str_digest)
|
|||
size_t digest_len;
|
||||
VALUE str;
|
||||
char *p;
|
||||
int i, j, seed = 1;
|
||||
size_t i, j, seed = 1;
|
||||
static const char vowels[] = {
|
||||
'a', 'e', 'i', 'o', 'u', 'y'
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ hexencode_str_new(VALUE str_digest)
|
|||
{
|
||||
char *digest;
|
||||
size_t digest_len;
|
||||
int i;
|
||||
size_t i;
|
||||
VALUE str;
|
||||
char *p;
|
||||
static const char hex[] = {
|
||||
|
|
|
@ -467,8 +467,8 @@ iconv_convert(iconv_t cd, VALUE str, long start, long length, int toidx, struct
|
|||
if (0 <= outlen && outlen <= sizeof(buffer)) {
|
||||
outlen = sizeof(buffer) - outlen;
|
||||
if (NIL_P(error) || /* something converted */
|
||||
outlen > inptr - tmpstart || /* input can't contain output */
|
||||
(outlen < inptr - tmpstart && inlen > 0) || /* something skipped */
|
||||
outlen > (size_t)(inptr - tmpstart) || /* input can't contain output */
|
||||
(outlen < (size_t)(inptr - tmpstart) && inlen > 0) || /* something skipped */
|
||||
memcmp(buffer, tmpstart, outlen)) /* something differs */
|
||||
{
|
||||
if (NIL_P(str)) {
|
||||
|
|
|
@ -887,7 +887,7 @@ inspect_sockaddr(VALUE addrinfo, VALUE ret)
|
|||
if (rai->sockaddr_len == 0) {
|
||||
rb_str_cat2(ret, "empty-sockaddr");
|
||||
}
|
||||
else if (rai->sockaddr_len < ((char*)&rai->addr.ss_family + sizeof(rai->addr.ss_family)) - (char*)&rai->addr)
|
||||
else if ((long)rai->sockaddr_len < ((char*)&rai->addr.ss_family + sizeof(rai->addr.ss_family)) - (char*)&rai->addr)
|
||||
rb_str_cat2(ret, "too-short-sockaddr");
|
||||
else {
|
||||
switch (rai->addr.ss_family) {
|
||||
|
|
|
@ -1458,7 +1458,7 @@ sockaddr_obj(struct sockaddr *addr)
|
|||
break;
|
||||
}
|
||||
#ifdef SA_LEN
|
||||
if (len < SA_LEN(addr))
|
||||
if (len < (socklen_t)SA_LEN(addr))
|
||||
len = SA_LEN(addr);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ syck_emitter_write( SyckEmitter *e, const char *str, long len )
|
|||
* Flush if at end of buffer
|
||||
*/
|
||||
at = e->marker - e->buffer;
|
||||
if ( len + at >= e->bufsize )
|
||||
if ( len + at >= (long)e->bufsize )
|
||||
{
|
||||
syck_emitter_flush( e, 0 );
|
||||
for (;;) {
|
||||
|
@ -326,7 +326,7 @@ syck_emitter_flush( SyckEmitter *e, long check_room )
|
|||
*/
|
||||
if ( check_room > 0 )
|
||||
{
|
||||
if ( e->bufsize > ( e->marker - e->buffer ) + check_room )
|
||||
if ( (long)e->bufsize > ( e->marker - e->buffer ) + check_room )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ void syck_emit_tag( SyckEmitter *e, const char *tag, const char *ignore )
|
|||
const char *subd = tag + 4;
|
||||
while ( *subd != ':' && *subd != '\0' ) subd++;
|
||||
if ( *subd == ':' ) {
|
||||
if ( subd - tag > ( strlen( YAML_DOMAIN ) + 5 ) &&
|
||||
if ( subd - tag > ( (long)( strlen( YAML_DOMAIN ) + 5 )) &&
|
||||
strncmp( subd - strlen( YAML_DOMAIN ), YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) {
|
||||
syck_emitter_write( e, tag + 4, subd - strlen( YAML_DOMAIN ) - ( tag + 4 ) - 1 );
|
||||
syck_emitter_write( e, "/", 1 );
|
||||
|
|
|
@ -497,7 +497,7 @@ zstream_append_buffer(struct zstream *z, const Bytef *src, int len)
|
|||
z->stream.avail_out = 0;
|
||||
}
|
||||
else {
|
||||
if (z->stream.avail_out >= len) {
|
||||
if (z->stream.avail_out >= (uInt)len) {
|
||||
z->stream.avail_out -= len;
|
||||
}
|
||||
else {
|
||||
|
@ -609,7 +609,7 @@ zstream_append_input(struct zstream *z, const Bytef *src, unsigned int len)
|
|||
static void
|
||||
zstream_discard_input(struct zstream *z, unsigned int len)
|
||||
{
|
||||
if (NIL_P(z->input) || RSTRING_LEN(z->input) <= len) {
|
||||
if (NIL_P(z->input) || (unsigned int)RSTRING_LEN(z->input) <= len) {
|
||||
z->input = Qnil;
|
||||
}
|
||||
else {
|
||||
|
@ -1921,7 +1921,7 @@ gzfile_make_header(struct gzfile *gz)
|
|||
buf[1] = GZ_MAGIC2;
|
||||
buf[2] = GZ_METHOD_DEFLATE;
|
||||
buf[3] = flags;
|
||||
gzfile_set32(gz->mtime, &buf[4]);
|
||||
gzfile_set32((unsigned long)gz->mtime, &buf[4]);
|
||||
buf[8] = extraflags;
|
||||
buf[9] = gz->os_code;
|
||||
zstream_append_buffer(&gz->z, buf, sizeof(buf));
|
||||
|
|
Loading…
Add table
Reference in a new issue