com php-src: printf int format fixes: Zend/zend_API.c Zen d/zend_builtin_functions.c Zend/zend_exceptions.c Zend/zend_execute.c Zend/zend_operators.c

From: Date: Sun, 24 Nov 2013 21:10:57 +0000
Subject: com php-src: printf int format fixes: Zend/zend_API.c Zen d/zend_builtin_functions.c Zend/zend_exceptions.c Zend/zend_execute.c Zend/zend_operators.c
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
Commit:    d8c7d69543c8cc0609facb2d35e636cb59c38385
Author:    Anatol Belski <[email protected]>         Sun, 24 Nov 2013 22:10:57 +0100
Parents:   08bbd2b5101006eabc932a6076417336ebcaf889
Branches:  str_size_and_int64

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=d8c7d69543c8cc0609facb2d35e636cb59c38385

Log:
printf int format fixes

Changed paths:
  M  Zend/zend_API.c
  M  Zend/zend_builtin_functions.c
  M  Zend/zend_exceptions.c
  M  Zend/zend_execute.c
  M  Zend/zend_operators.c


Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 869f1a5..912f0e3 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1580,7 +1580,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{
*/
 			result = zend_symtable_update(ht, "", 1, &value, sizeof(zval *), NULL);
 			break;
 		case IS_RESOURCE:
-			zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)",
Z_LVAL_P(key), Z_LVAL_P(key));
+			zend_error(E_STRICT, "Resource ID#" ZEND_INT_FMT " used as offset, casting to
integer (" ZEND_INT_FMT ")", Z_LVAL_P(key), Z_LVAL_P(key));
 			/* break missing intentionally */
 		case IS_BOOL:
 		case IS_LONG:
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 153b4d2..18a58fe 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -430,7 +430,7 @@ ZEND_FUNCTION(func_get_arg)
 	arg_count = (int)(zend_uintptr_t) *p;		/* this is the amount of arguments passed to
func_get_arg(); */
 
 	if (requested_offset >= arg_count) {
-		zend_error(E_WARNING, "func_get_arg():  Argument %ld not passed to function",
requested_offset);
+		zend_error(E_WARNING, "func_get_arg():  Argument " ZEND_INT_FMT " not passed to
function", requested_offset);
 		RETURN_FALSE;
 	}
 
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 791a53f..8e7739b 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -619,12 +619,12 @@ ZEND_METHOD(exception, __toString)
 		}
 
 		if (Z_STRSIZE(message) > 0) {
-			len = zend_spprintf(&str, 0, "exception '%s' with message '%s' in
%s:%ld\nStack trace:\n%s%s%s",
+			len = zend_spprintf(&str, 0, "exception '%s' with message '%s' in
%s:" ZEND_INT_FMT "\nStack trace:\n%s%s%s",
 								Z_OBJCE_P(exception)->name, Z_STRVAL(message), Z_STRVAL(file), Z_LVAL(line),
 								(trace && Z_STRSIZE_P(trace)) ? Z_STRVAL_P(trace) : "#0 {main}\n",
 								len ? "\n\nNext " : "", prev_str);
 		} else {
-			len = zend_spprintf(&str, 0, "exception '%s' in %s:%ld\nStack
trace:\n%s%s%s",
+			len = zend_spprintf(&str, 0, "exception '%s' in %s:" ZEND_INT_FMT
"\nStack trace:\n%s%s%s",
 								Z_OBJCE_P(exception)->name, Z_STRVAL(file), Z_LVAL(line),
 								(trace && Z_STRSIZE_P(trace)) ? Z_STRVAL_P(trace) : "#0 {main}\n",
 								len ? "\n\nNext " : "", prev_str);
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 3d649d7..85b8cd8 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1047,7 +1047,7 @@ fetch_string_dim:
 			hval = zend_dval_to_lval(Z_DVAL_P(dim));
 			goto num_index;
 		case IS_RESOURCE:
-			zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)",
Z_LVAL_P(dim), Z_LVAL_P(dim));
+			zend_error(E_STRICT, "Resource ID#" ZEND_INT_FMT " used as offset, casting to
integer (" ZEND_INT_FMT ")", Z_LVAL_P(dim), Z_LVAL_P(dim));
 			/* Fall Through */
 		case IS_BOOL:
 		case IS_LONG:
@@ -1056,14 +1056,14 @@ num_index:
 			if (zend_hash_index_find(ht, hval, (void **) &retval) == FAILURE) {
 				switch (type) {
 					case BP_VAR_R:
-						zend_error(E_NOTICE,"Undefined offset: %ld", hval);
+						zend_error(E_NOTICE,"Undefined offset: " ZEND_INT_FMT, hval);
 						/* break missing intentionally */
 					case BP_VAR_UNSET:
 					case BP_VAR_IS:
 						retval = &EG(uninitialized_zval_ptr);
 						break;
 					case BP_VAR_RW:
-						zend_error(E_NOTICE,"Undefined offset: %ld", hval);
+						zend_error(E_NOTICE,"Undefined offset: " ZEND_INT_FMT, hval);
 						/* break missing intentionally */
 					case BP_VAR_W: {
 						zval *new_zval = &EG(uninitialized_zval);
@@ -1305,7 +1305,7 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval
**cont
 
 				if (Z_LVAL_P(dim) < 0 || Z_STRSIZE_P(container) <= Z_LVAL_P(dim)) {
 					if (type != BP_VAR_IS) {
-						zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
+						zend_error(E_NOTICE, "Uninitialized string offset: " ZEND_INT_FMT, Z_LVAL_P(dim));
 					}
 					Z_STRVAL_P(ptr) = STR_EMPTY_ALLOC();
 					Z_STRSIZE_P(ptr) = 0;
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 2ce466e..44b194d 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -616,7 +616,7 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
 			TSRMLS_FETCH();
 
 			zend_list_delete(Z_LVAL_P(op));
-			Z_STRSIZE_P(op) = zend_spprintf(&Z_STRVAL_P(op), 0, "Resource id #%ld", tmp);
+			Z_STRSIZE_P(op) = zend_spprintf(&Z_STRVAL_P(op), 0, "Resource id #" ZEND_INT_FMT,
tmp);
 			break;
 		}
 		case IS_LONG:



Thread (5 messages)

« previous php.cvs (#74036) next »