зеркало из https://github.com/github/ruby.git
* process.c: suppress warning for signed and unsigned type
inconsistency. * ext/psych/parser.c: ditto. * ext/sdbm/_sdbm.c: ditto. * ext/syck/rubyext.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0f074e6546
Коммит
e181ae5391
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Mon May 17 22:19:16 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* process.c: suppress warning for signed and unsigned type
|
||||
inconsistency.
|
||||
|
||||
* ext/psych/parser.c: ditto.
|
||||
|
||||
* ext/sdbm/_sdbm.c: ditto.
|
||||
|
||||
* ext/syck/rubyext.c: ditto.
|
||||
|
||||
Mon May 17 21:30:50 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* .gitignore: updated.
|
||||
|
|
|
@ -55,7 +55,7 @@ static VALUE parse(VALUE self, VALUE yaml)
|
|||
int done = 0;
|
||||
#ifdef HAVE_RUBY_ENCODING_H
|
||||
int encoding = rb_enc_find_index("ASCII-8BIT");
|
||||
rb_encoding * internal_enc;
|
||||
rb_encoding * internal_enc = 0;
|
||||
#endif
|
||||
VALUE handler = rb_iv_get(self, "@handler");
|
||||
|
||||
|
|
|
@ -861,7 +861,7 @@ chkpage(char *pag)
|
|||
register int off;
|
||||
register short *ino = (short *) pag;
|
||||
|
||||
if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / sizeof(short))
|
||||
if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / (int)sizeof(short))
|
||||
return 0;
|
||||
|
||||
if (n > 0) {
|
||||
|
|
|
@ -275,7 +275,7 @@ mktime_do(struct mktime_arg *arg)
|
|||
char *end = ptr + 1;
|
||||
char *p = end;
|
||||
while ( isdigit( *end ) ) end++;
|
||||
if (end - p < sizeof(padded)) {
|
||||
if (end - p < (int)sizeof(padded)) {
|
||||
MEMCPY(padded, ptr + 1, char, end - (ptr + 1));
|
||||
p = padded;
|
||||
}
|
||||
|
|
12
process.c
12
process.c
|
@ -4093,9 +4093,9 @@ p_uid_change_privilege(VALUE obj, VALUE id)
|
|||
#endif
|
||||
} else { /* unprivileged user */
|
||||
#if defined(HAVE_SETRESUID)
|
||||
if (setresuid((getuid() == uid)? -1: uid,
|
||||
(geteuid() == uid)? -1: uid,
|
||||
(SAVED_USER_ID == uid)? -1: uid) < 0) rb_sys_fail(0);
|
||||
if (setresuid((getuid() == uid)? (rb_uid_t)-1: uid,
|
||||
(geteuid() == uid)? (rb_uid_t)-1: uid,
|
||||
(SAVED_USER_ID == uid)? (rb_uid_t)-1: uid) < 0) rb_sys_fail(0);
|
||||
SAVED_USER_ID = uid;
|
||||
#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
|
||||
if (SAVED_USER_ID == uid) {
|
||||
|
@ -4712,9 +4712,9 @@ p_gid_change_privilege(VALUE obj, VALUE id)
|
|||
#endif
|
||||
} else { /* unprivileged user */
|
||||
#if defined(HAVE_SETRESGID)
|
||||
if (setresgid((getgid() == gid)? -1: gid,
|
||||
(getegid() == gid)? -1: gid,
|
||||
(SAVED_GROUP_ID == gid)? -1: gid) < 0) rb_sys_fail(0);
|
||||
if (setresgid((getgid() == gid)? (rb_gid_t)-1: gid,
|
||||
(getegid() == gid)? (rb_gid_t)-1: gid,
|
||||
(SAVED_GROUP_ID == gid)? (rb_gid_t)-1: gid) < 0) rb_sys_fail(0);
|
||||
SAVED_GROUP_ID = gid;
|
||||
#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
|
||||
if (SAVED_GROUP_ID == gid) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче