aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-19 03:19:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-19 03:19:20 +0000
commit038c0e5a804f1736e884f6741b9d7e84606580d7 (patch)
tree4505d88a455683259c327e042217988ed550ba67 /ext/tk
parentab32fbdbf980661c38a8129809b8c9129bb54e1c (diff)
downloadruby-038c0e5a804f1736e884f6741b9d7e84606580d7.tar.gz
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
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/tkutil/tkutil.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index c1c4e3fa78..9fcae0e082 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -1356,7 +1356,7 @@ cbsubst_sym_to_subst(self, sym)
*(ptr++) = '%';
- if (len = inf->keylen[idx]) {
+ if ((len = inf->keylen[idx]) != 0) {
/* longname */
strncpy(ptr, inf->key[idx], len);
ptr += len;
@@ -1426,7 +1426,7 @@ cbsubst_get_subst_arg(argc, argv, self)
*(ptr++) = '%';
- if (len = inf->keylen[idx]) {
+ if ((len = inf->keylen[idx]) != 0) {
/* longname */
strncpy(ptr, inf->key[idx], len);
ptr += len;
@@ -1523,7 +1523,7 @@ cbsubst_get_all_subst_keys(self)
*(ptr++) = '%';
- if (len = inf->keylen[idx]) {
+ if ((len = inf->keylen[idx]) != 0) {
/* longname */
strncpy(ptr, inf->key[idx], len);
ptr += len;
@@ -1691,7 +1691,7 @@ cbsubst_scan_args(self, arg_key, val_ary)
} else if (*(keyptr + idx) == ' ') {
proc = Qnil;
} 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));
} else {
proc = Qnil;