Skip to content

Commit

Permalink
Fix some clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jul 23, 2020
1 parent b6b6e76 commit 545928e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/intl/dateformat/dateformat_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex

/* Since return is in sec. */
result = (double)timestamp / U_MILLIS_PER_SECOND;
if(result > LONG_MAX || result < -LONG_MAX) {
if (result > (double)LONG_MAX || result < (double)LONG_MIN) {

This comment has been minimized.

Copy link
@staabm

staabm Jul 23, 2020

Contributor

looks like you dropped a - here

This comment has been minimized.

Copy link
@staabm

staabm Jul 23, 2020

Contributor

ohh just realized you changed LONG_MAX to LONG_MIN .. all good then

ZVAL_DOUBLE(return_value, result<0?ceil(result):floor(result));
} else {
ZVAL_LONG(return_value, (zend_long)result);
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/mysqli_nonapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static int mysqlnd_zval_array_to_mysqlnd_array(zval *in_array, MYSQLND ***out_ar
return FAILURE;
}
mysql = (MY_MYSQL*) my_res->ptr;
if (MYSQLI_STATUS_VALID && my_res->status < MYSQLI_STATUS_VALID) {
if (my_res->status < MYSQLI_STATUS_VALID) {
zend_throw_error(NULL, "%s object is not fully initialized", ZSTR_VAL(intern->zo.ce->name));
return FAILURE;
}
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/php_mysqli_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * resul
RETURN_THROWS();\
}\
__ptr = (__type)my_res->ptr; \
if (__check && my_res->status < __check) { \
if (my_res->status < __check) { \
zend_throw_error(NULL, "%s object is not fully initialized", ZSTR_VAL(intern->zo.ce->name)); \
RETURN_THROWS();\
}\
Expand All @@ -243,7 +243,7 @@ extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * resul
return;\
}\
__ptr = (__type)my_res->ptr; \
if (__check && my_res->status < __check) { \
if (my_res->status < __check) { \
zend_throw_error(NULL, "%s object is not fully initialized", ZSTR_VAL(intern->zo.ce->name)); \
return;\
}\
Expand Down
1 change: 1 addition & 0 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wtautological-compare"
# pragma clang diagnostic ignored "-Wstring-compare"
#endif

const char* zend_reg_name[] = {
Expand Down

0 comments on commit 545928e

Please sign in to comment.