Skip to content

Commit

Permalink
suppress warnings
Browse files Browse the repository at this point in the history
* ext/date/date_parse.c (date_zone_to_diff): suppress parentheses
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Nov 8, 2015
1 parent 0d65138 commit 6e19fc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ext/date/date_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,13 @@ date_zone_to_diff(VALUE str)

str = rb_str_new2(s);

if (p = strchr(s, ':')) {
if ((p = strchr(s, ':')) != NULL) {
hour = rb_str_new(s, p - s);
s = ++p;
if (p = strchr(s, ':')) {
if ((p = strchr(s, ':')) != NULL) {
min = rb_str_new(s, p - s);
s = ++p;
if (p = strchr(s, ':')) {
if ((p = strchr(s, ':')) != NULL) {
sec = rb_str_new(s, p - s);
}
else
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ ssl_npn_select_cb_common(VALUE cb, const unsigned char **out, unsigned char *out
VALUE protocols = rb_ary_new();

/* The format is len_1|proto_1|...|len_n|proto_n\0 */
while (l = *in++) {
while ((l = *in++) != '\0') {
VALUE protocol;
if (l > inlen) {
ossl_raise(eSSLError, "Invalid protocol name list");
Expand Down

0 comments on commit 6e19fc3

Please sign in to comment.