Skip to content

Commit 545928e

Browse files
committed
Fix some clang warnings
1 parent b6b6e76 commit 545928e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

ext/intl/dateformat/dateformat_parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex
5151

5252
/* Since return is in sec. */
5353
result = (double)timestamp / U_MILLIS_PER_SECOND;
54-
if(result > LONG_MAX || result < -LONG_MAX) {
54+
if (result > (double)LONG_MAX || result < (double)LONG_MIN) {
5555
ZVAL_DOUBLE(return_value, result<0?ceil(result):floor(result));
5656
} else {
5757
ZVAL_LONG(return_value, (zend_long)result);

ext/mysqli/mysqli_nonapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int mysqlnd_zval_array_to_mysqlnd_array(zval *in_array, MYSQLND ***out_ar
734734
return FAILURE;
735735
}
736736
mysql = (MY_MYSQL*) my_res->ptr;
737-
if (MYSQLI_STATUS_VALID && my_res->status < MYSQLI_STATUS_VALID) {
737+
if (my_res->status < MYSQLI_STATUS_VALID) {
738738
zend_throw_error(NULL, "%s object is not fully initialized", ZSTR_VAL(intern->zo.ce->name));
739739
return FAILURE;
740740
}

ext/mysqli/php_mysqli_structs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * resul
229229
RETURN_THROWS();\
230230
}\
231231
__ptr = (__type)my_res->ptr; \
232-
if (__check && my_res->status < __check) { \
232+
if (my_res->status < __check) { \
233233
zend_throw_error(NULL, "%s object is not fully initialized", ZSTR_VAL(intern->zo.ce->name)); \
234234
RETURN_THROWS();\
235235
}\
@@ -243,7 +243,7 @@ extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * resul
243243
return;\
244244
}\
245245
__ptr = (__type)my_res->ptr; \
246-
if (__check && my_res->status < __check) { \
246+
if (my_res->status < __check) { \
247247
zend_throw_error(NULL, "%s object is not fully initialized", ZSTR_VAL(intern->zo.ce->name)); \
248248
return;\
249249
}\

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
#if defined(__clang__)
111111
# pragma clang diagnostic push
112112
# pragma clang diagnostic ignored "-Wtautological-compare"
113+
# pragma clang diagnostic ignored "-Wstring-compare"
113114
#endif
114115

115116
const char* zend_reg_name[] = {

0 commit comments

Comments
 (0)