com php-src: Fix warning about sign-mismatch comparisons: ext/standard/php_smart_string.h
| From: | JulienPauli | Date: | Fri, 02 Sep 2016 15:01:52 +0000 |
| Subject: | com php-src: Fix warning about sign-mismatch comparisons: ext/standard/php_smart_string.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94248@lists.php.net to get a copy of this message | ||
Commit: e14b14d026fd588117d8c976cb2dfdeafb45c8dd
Author: Julien Pauli <jpauli@php.net> Fri, 2 Sep 2016 17:01:52 +0200
Parents: ccc8d92d3d86046e29c53035ab0bac377ad0e067
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e14b14d026fd588117d8c976cb2dfdeafb45c8dd
Log:
Fix warning about sign-mismatch comparisons
Changed paths:
M ext/standard/php_smart_string.h
Diff:
diff --git a/ext/standard/php_smart_string.h b/ext/standard/php_smart_string.h
index 1175d32..ea2cc4b 100644
--- a/ext/standard/php_smart_string.h
+++ b/ext/standard/php_smart_string.h
@@ -61,7 +61,7 @@
: newlen + SMART_STRING_PREALLOC; \
SMART_STRING_DO_REALLOC(d, what); \
} else { \
- if(UNEXPECTED(n > SIZE_MAX - (d)->len)) { \
+ if(UNEXPECTED((size_t)n > SIZE_MAX - (d)->len)) { \
zend_error(E_ERROR, "String size overflow"); \
} \
newlen = (d)->len + (n); \