From 038c0e5a804f1736e884f6741b9d7e84606580d7 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 19 Apr 2015 03:19:20 +0000 Subject: 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 --- ext/tk/tkutil/tkutil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/tk/tkutil') 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; -- cgit v1.2.3