summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2013-03-29 12:36:57 +0100
committerNikita Popov <nikic@php.net>2013-03-29 12:55:00 +0100
commit8aff7f05287db900d51ab49457ef04f39cdcf527 (patch)
treeb352bf2db31c84f97ec1603e2f67437e16d1bde3 /ext
parent8345abcabb487c128ac5ee29884e0ae7d705bd47 (diff)
downloadphp-git-8aff7f05287db900d51ab49457ef04f39cdcf527.tar.gz
Fix "passing NULL to non-pointer argument" warnings in intl
The second argument to spprintf is a size_t (maximum length).
Diffstat (limited to 'ext')
-rw-r--r--ext/intl/breakiterator/breakiterator_methods.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp
index 6a61f8cb93..1a1b4fd127 100644
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -53,7 +53,7 @@ static void _breakiter_factory(const char *func_name,
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!",
&locale_str, &dummy) == FAILURE) {
- spprintf(&msg, NULL, "%s: bad arguments", func_name);
+ spprintf(&msg, 0, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_NULL();
@@ -66,7 +66,7 @@ static void _breakiter_factory(const char *func_name,
biter = func(Locale::createFromName(locale_str), status);
intl_error_set_code(NULL, status TSRMLS_CC);
if (U_FAILURE(status)) {
- spprintf(&msg, NULL, "%s: error creating BreakIterator",
+ spprintf(&msg, 0, "%s: error creating BreakIterator",
func_name);
intl_error_set_custom_msg(NULL, msg, 1 TSRMLS_CC);
efree(msg);
@@ -201,7 +201,7 @@ static void _breakiter_no_args_ret_int32(
object = getThis();
if (zend_parse_parameters_none() == FAILURE) {
- spprintf(&msg, NULL, "%s: bad arguments", func_name);
+ spprintf(&msg, 0, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_FALSE;
@@ -225,7 +225,7 @@ static void _breakiter_int32_ret_int32(
object = getThis();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg) == FAILURE) {
- spprintf(&msg, NULL, "%s: bad arguments", func_name);
+ spprintf(&msg, 0, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
RETURN_FALSE;
@@ -234,7 +234,7 @@ static void _breakiter_int32_ret_int32(
BREAKITER_METHOD_FETCH_OBJECT;
if (arg < INT32_MIN || arg > INT32_MAX) {
- spprintf(&msg, NULL, "%s: offset argument is outside bounds of "
+ spprintf(&msg, 0, "%s: offset argument is outside bounds of "
"a 32-bit wide integer", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);