ext: suppress warnings
* ext/{etc,openssl,tk}: Adding parens and comparisons around assignments to get rid of Wparentheses warnings. [Fix GH-875] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ab32fbdbf9
commit
038c0e5a80
@ -1,3 +1,8 @@
|
|||||||
|
Sun Apr 19 12:19:17 2015 Chad Brewbaker <crb002@gmail.com>
|
||||||
|
|
||||||
|
* ext/{etc,openssl,tk}: Adding parens and comparisons around
|
||||||
|
assignments to get rid of Wparentheses warnings. [Fix GH-875]
|
||||||
|
|
||||||
Sun Apr 19 10:42:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Apr 19 10:42:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* hash.c (get_env_cstr): environment variables must be ASCII
|
* hash.c (get_env_cstr): environment variables must be ASCII
|
||||||
|
@ -241,7 +241,7 @@ passwd_iterate(void)
|
|||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
setpwent();
|
setpwent();
|
||||||
while (pw = getpwent()) {
|
while ((pw = getpwent()) != 0) {
|
||||||
rb_yield(setup_passwd(pw));
|
rb_yield(setup_passwd(pw));
|
||||||
}
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
@ -287,7 +287,7 @@ etc_passwd(VALUE obj)
|
|||||||
if (rb_block_given_p()) {
|
if (rb_block_given_p()) {
|
||||||
each_passwd();
|
each_passwd();
|
||||||
}
|
}
|
||||||
else if (pw = getpwent()) {
|
else if ((pw = getpwent()) != 0) {
|
||||||
return setup_passwd(pw);
|
return setup_passwd(pw);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -369,7 +369,7 @@ etc_getpwent(VALUE obj)
|
|||||||
#ifdef HAVE_GETPWENT
|
#ifdef HAVE_GETPWENT
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
if (pw = getpwent()) {
|
if ((pw = getpwent()) != 0) {
|
||||||
return setup_passwd(pw);
|
return setup_passwd(pw);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -485,7 +485,7 @@ group_iterate(void)
|
|||||||
struct group *pw;
|
struct group *pw;
|
||||||
|
|
||||||
setgrent();
|
setgrent();
|
||||||
while (pw = getgrent()) {
|
while ((pw = getgrent()) != 0) {
|
||||||
rb_yield(setup_group(pw));
|
rb_yield(setup_group(pw));
|
||||||
}
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
@ -527,7 +527,7 @@ etc_group(VALUE obj)
|
|||||||
if (rb_block_given_p()) {
|
if (rb_block_given_p()) {
|
||||||
each_group();
|
each_group();
|
||||||
}
|
}
|
||||||
else if (grp = getgrent()) {
|
else if ((grp = getgrent()) != 0) {
|
||||||
return setup_group(grp);
|
return setup_group(grp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -606,7 +606,7 @@ etc_getgrent(VALUE obj)
|
|||||||
#ifdef HAVE_GETGRENT
|
#ifdef HAVE_GETGRENT
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
|
|
||||||
if (gr = getgrent()) {
|
if ((gr = getgrent()) != 0) {
|
||||||
return setup_group(gr);
|
return setup_group(gr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1124,7 +1124,7 @@ ossl_ssl_shutdown(SSL *ssl)
|
|||||||
* Ignore the case SSL_shutdown returns -1. Empty handshake_func
|
* Ignore the case SSL_shutdown returns -1. Empty handshake_func
|
||||||
* must not happen.
|
* must not happen.
|
||||||
*/
|
*/
|
||||||
if (rc = SSL_shutdown(ssl))
|
if ((rc = SSL_shutdown(ssl)) != 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SSL_clear(ssl);
|
SSL_clear(ssl);
|
||||||
|
@ -1356,7 +1356,7 @@ cbsubst_sym_to_subst(self, sym)
|
|||||||
|
|
||||||
*(ptr++) = '%';
|
*(ptr++) = '%';
|
||||||
|
|
||||||
if (len = inf->keylen[idx]) {
|
if ((len = inf->keylen[idx]) != 0) {
|
||||||
/* longname */
|
/* longname */
|
||||||
strncpy(ptr, inf->key[idx], len);
|
strncpy(ptr, inf->key[idx], len);
|
||||||
ptr += len;
|
ptr += len;
|
||||||
@ -1426,7 +1426,7 @@ cbsubst_get_subst_arg(argc, argv, self)
|
|||||||
|
|
||||||
*(ptr++) = '%';
|
*(ptr++) = '%';
|
||||||
|
|
||||||
if (len = inf->keylen[idx]) {
|
if ((len = inf->keylen[idx]) != 0) {
|
||||||
/* longname */
|
/* longname */
|
||||||
strncpy(ptr, inf->key[idx], len);
|
strncpy(ptr, inf->key[idx], len);
|
||||||
ptr += len;
|
ptr += len;
|
||||||
@ -1523,7 +1523,7 @@ cbsubst_get_all_subst_keys(self)
|
|||||||
|
|
||||||
*(ptr++) = '%';
|
*(ptr++) = '%';
|
||||||
|
|
||||||
if (len = inf->keylen[idx]) {
|
if ((len = inf->keylen[idx]) != 0) {
|
||||||
/* longname */
|
/* longname */
|
||||||
strncpy(ptr, inf->key[idx], len);
|
strncpy(ptr, inf->key[idx], len);
|
||||||
ptr += len;
|
ptr += len;
|
||||||
@ -1691,7 +1691,7 @@ cbsubst_scan_args(self, arg_key, val_ary)
|
|||||||
} else if (*(keyptr + idx) == ' ') {
|
} else if (*(keyptr + idx) == ' ') {
|
||||||
proc = Qnil;
|
proc = Qnil;
|
||||||
} else {
|
} else {
|
||||||
if (type_chr = inf->type[*(keyptr + idx)]) {
|
if ((type_chr = inf->type[*(keyptr + idx)]) != 0) {
|
||||||
proc = rb_hash_aref(inf->proc, INT2FIX((int)type_chr));
|
proc = rb_hash_aref(inf->proc, INT2FIX((int)type_chr));
|
||||||
} else {
|
} else {
|
||||||
proc = Qnil;
|
proc = Qnil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user