diff options
author | Stefan Esser <sesser@php.net> | 2003-03-06 20:31:20 +0000 |
---|---|---|
committer | Stefan Esser <sesser@php.net> | 2003-03-06 20:31:20 +0000 |
commit | af4aa97d1ec853836f70601cb9666794476cd140 (patch) | |
tree | 9f674907222edd525084a127db195cddf82afbb7 | |
parent | 2d40fe2222f6b252423f3a1965f82104ba59a504 (diff) | |
download | php-git-af4aa97d1ec853836f70601cb9666794476cd140.tar.gz |
Fixing functionicalls with variable number of parameters...
-rw-r--r-- | ext/cyrus/cyrus.c | 2 | ||||
-rw-r--r-- | ext/db/db.c | 2 | ||||
-rw-r--r-- | ext/domxml/php_domxml.c | 6 | ||||
-rw-r--r-- | ext/fbsql/php_fbsql.c | 4 | ||||
-rw-r--r-- | ext/gd/libgd/gdtestft.c | 4 | ||||
-rw-r--r-- | ext/ming/ming.c | 2 | ||||
-rw-r--r-- | ext/msession/msession.c | 42 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 4 | ||||
-rw-r--r-- | ext/standard/file.c | 4 | ||||
-rw-r--r-- | ext/xslt/sablot.c | 2 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 14 | ||||
-rw-r--r-- | main/main.c | 2 | ||||
-rwxr-xr-x | main/streams/streams.c | 4 | ||||
-rw-r--r-- | sapi/servlet/servlet.c | 2 |
14 files changed, 47 insertions, 47 deletions
diff --git a/ext/cyrus/cyrus.c b/ext/cyrus/cyrus.c index dfea22ee70..ede15cc727 100644 --- a/ext/cyrus/cyrus.c +++ b/ext/cyrus/cyrus.c @@ -110,7 +110,7 @@ extern void fatal(char *s, int exit) { TSRMLS_FETCH(); - php_error_docref(NULL TSRMLS_CC, E_ERROR, s); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "%s", s); } /* {{{ proto resource cyrus_connect([ string host [, string port [, int flags]]]) diff --git a/ext/db/db.c b/ext/db/db.c index 338d8dd581..b45c7e4df5 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -258,7 +258,7 @@ PHP_MINFO_FUNCTION(db) { /* this isn't pretty ... should break out the info a bit more (cmv) */ php_info_print_box_start(0); - php_printf(php_get_info_db()); + php_printf("%s", php_get_info_db()); php_info_print_box_end(); } /* }}} */ diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 9027d42a80..c53eb0caf4 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -1321,7 +1321,7 @@ static void domxml_error(void *ctx, const char *msg, ...) va_start(ap, msg); vsnprintf(buf, 1024, msg, ap); va_end(ap); - php_error_docref(NULL TSRMLS_CC, E_WARNING, buf); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", buf); } static void domxml_error_ext(void *ctx, const char *msg, ...) @@ -1356,7 +1356,7 @@ static void domxml_error_ext(void *ctx, const char *msg, ...) } add_next_index_zval(ctxt->_private,errormessages); } - php_error_docref(NULL TSRMLS_CC, E_WARNING, buf); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", buf); } @@ -1401,7 +1401,7 @@ static void domxml_error_validate(void *ctx, const char *msg, ...) add_next_index_zval(ctxt->errors,errormessages); } - php_error_docref(NULL TSRMLS_CC, E_WARNING, buf); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", buf); } diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 0b278f2d02..8154109d7a 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -735,7 +735,7 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link TSRMLS_DC) if (c == NULL) { if (FB_SQL_G(generateWarnings)) - php_error_docref(NULL TSRMLS_CC, E_WARNING, fbcdcClassErrorMessage()); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", fbcdcClassErrorMessage()); return 0; } md = fbcdcCreateSession(c, "PHP", link->userName, link->userPassword, link->userName); @@ -746,7 +746,7 @@ static int php_fbsql_select_db(char *databaseName, PHPFBLink *link TSRMLS_DC) if (FB_SQL_G(generateWarnings)) { if (emg) - php_error_docref(NULL TSRMLS_CC, E_WARNING, emg); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", emg); else php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message"); } diff --git a/ext/gd/libgd/gdtestft.c b/ext/gd/libgd/gdtestft.c index 640960ca56..1bd0dfc515 100644 --- a/ext/gd/libgd/gdtestft.c +++ b/ext/gd/libgd/gdtestft.c @@ -60,7 +60,7 @@ main (int argc, char *argv[]) err = gdImageStringFT ((gdImagePtr) NULL, &brect[0], 0, f, sz, angle, 0, 0, s); if (err) { - fprintf (stderr, err); + fprintf (stderr, "%s", err); return 1; } @@ -87,7 +87,7 @@ main (int argc, char *argv[]) err = gdImageStringFT (im, NULL, black, f, sz, angle, x, y, s); if (err) { - fprintf (stderr, err); + fprintf (stderr, "%s", err); return 1; } /* TBB: Write img to test/fttest.png */ diff --git a/ext/ming/ming.c b/ext/ming/ming.c index d5687c453d..3b718315a9 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -2725,7 +2725,7 @@ static void php_ming_error(char *msg, ...) vspprintf(&buffer, 0, msg, args); va_end(args); - php_error_docref(NULL TSRMLS_CC, E_ERROR, buffer); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "%s", buffer); efree(buffer); } diff --git a/ext/msession/msession.c b/ext/msession/msession.c index c05cdc9a79..609d929273 100644 --- a/ext/msession/msession.c +++ b/ext/msession/msession.c @@ -352,7 +352,7 @@ int PHPMsessionSetData(char *session, char *data TSRMLS_DC) PHPExecRequest(REQ_DATASET, session,"",data,0); ret = (s_reqb->req.stat==REQ_OK); if(s_reqb->req.stat!=REQ_OK) - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); return ret; @@ -367,7 +367,7 @@ int PHPMsessionDestroy(char *session TSRMLS_DC) PHPExecRequest( REQ_DROP, session, "","",0); ret = (s_reqb->req.stat==REQ_OK); if(s_reqb->req.stat!=REQ_OK) - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); return ret; IFCONNECT_ENDVAL(0) @@ -454,7 +454,7 @@ PHP_FUNCTION(msession_create) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } IFCONNECT_END @@ -501,7 +501,7 @@ PHP_FUNCTION(msession_lock) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } @@ -609,7 +609,7 @@ PHP_FUNCTION(msession_unlock) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } IFCONNECT_END @@ -649,7 +649,7 @@ PHP_FUNCTION(msession_set) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } IFCONNECT_END @@ -688,7 +688,7 @@ PHP_FUNCTION(msession_get) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -720,7 +720,7 @@ PHP_FUNCTION(msession_uniq) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -752,7 +752,7 @@ PHP_FUNCTION(msession_randstr) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -797,7 +797,7 @@ PHP_FUNCTION(msession_find) } else if(s_reqb->req.stat != REQ_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -829,7 +829,7 @@ PHP_FUNCTION(msession_list) { /* May this should be an error? */ if(s_reqb->req.param != REQE_NOSESSION) - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -879,7 +879,7 @@ PHP_FUNCTION(msession_get_array) else { if(s_reqb->req.param != REQE_NOSESSION) - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -957,7 +957,7 @@ PHP_FUNCTION(msession_set_array) PHPExecRequestMulti(REQ_SETVAL, Z_STRVAL_PP(session), countpair, pairs,0); if(s_reqb->req.stat != REQ_OK) - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); efree((void *)pairs); IFCONNECT_END } @@ -1003,7 +1003,7 @@ PHP_FUNCTION(msession_listvar) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -1043,7 +1043,7 @@ PHP_FUNCTION(msession_timeout) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -1075,7 +1075,7 @@ PHP_FUNCTION(msession_inc) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } IFCONNECT_END @@ -1179,7 +1179,7 @@ PHP_FUNCTION(msession_plugin) } else if(s_reqb->req.stat != REQ_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } @@ -1228,7 +1228,7 @@ PHP_FUNCTION(msession_call) } else if(s_reqb->req.stat != REQ_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } IFCONNECT_END @@ -1257,7 +1257,7 @@ PHP_FUNCTION(msession_exec) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_NULL(); } IFCONNECT_END @@ -1277,7 +1277,7 @@ PHP_FUNCTION(msession_ping) } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); RETURN_FALSE; } IFCONNECT_END @@ -1372,7 +1372,7 @@ PS_CREATE_SID_FUNC(msession) else { ELOG("Reports that UNIQ failed"); - php_error_docref(NULL TSRMLS_CC, E_WARNING, ReqbErr(s_reqb)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ReqbErr(s_reqb)); } } ELOG("Yikes, could not get sid from msession 2003"); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index d4f0454646..d3ebdf5a06 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1965,7 +1965,7 @@ PHP_FUNCTION(call_user_method) zval *retval_ptr; int arg_count = ZEND_NUM_ARGS(); - php_error_docref(NULL TSRMLS_CC, E_NOTICE, _CUM_DEPREC); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", _CUM_DEPREC); if (arg_count < 2) { WRONG_PARAM_COUNT; @@ -2002,7 +2002,7 @@ PHP_FUNCTION(call_user_method_array) HashTable *params_ar; int num_elems, element = 0; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, _CUM_DEPREC); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", _CUM_DEPREC); if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &method_name, &obj, ¶ms) == FAILURE) { WRONG_PARAM_COUNT; diff --git a/ext/standard/file.c b/ext/standard/file.c index 54472d4bf5..46bba85e80 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1136,7 +1136,7 @@ PHPAPI int php_mkdir(char *dir, long mode TSRMLS_DC) } if ((ret = VCWD_MKDIR(dir, (mode_t)mode)) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); } return ret; @@ -1185,7 +1185,7 @@ PHP_FUNCTION(mkdir) if (*p == '\0' && *(p + 1) != '\0') { *p = DEFAULT_SLASH; if ((ret = VCWD_MKDIR(buf, (mode_t)mode)) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); break; } } diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index 35e7c071a9..e10fe841bd 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -1797,7 +1797,7 @@ static MH_ERROR error_print(void *user_data, SablotHandle proc, MH_ERROR code, M XSLT_REG_ERRMSG(errmsg, handle); /* Output a warning */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, msgbuf); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", msgbuf); /* Cleanup */ efree(msgbuf); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 280f45eaa3..7c1cc1e22d 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -446,7 +446,7 @@ PHP_FUNCTION(gzcompress) RETURN_STRINGL(s2, l2, 0); } else { efree(s2); - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } } @@ -502,7 +502,7 @@ PHP_FUNCTION(gzuncompress) RETURN_STRINGL(s2, length, 0); } else { efree(s2); - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } } @@ -572,7 +572,7 @@ PHP_FUNCTION(gzdeflate) RETURN_STRINGL(s2, stream.total_out, 0); } else { efree(s2); - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } } @@ -654,7 +654,7 @@ PHP_FUNCTION(gzinflate) RETURN_STRINGL(s2, stream.total_out, 0); } else { efree(s2); - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } } @@ -850,14 +850,14 @@ PHP_FUNCTION(gzencode) -MAX_WBITS, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY)) != Z_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } break; case CODING_DEFLATE: if ((status = deflateInit(&stream, level)) != Z_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } break; @@ -895,7 +895,7 @@ PHP_FUNCTION(gzencode) RETURN_STRINGL(s2, stream.total_out+GZIP_HEADER_LENGTH+(coding==CODING_GZIP?GZIP_FOOTER_LENGTH:0), 0); } else { efree(s2); - php_error_docref(NULL TSRMLS_CC, E_WARNING, zError(status)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", zError(status)); RETURN_FALSE; } } diff --git a/main/main.c b/main/main.c index e2ef4aefe4..6a48bcd69e 100644 --- a/main/main.c +++ b/main/main.c @@ -839,7 +839,7 @@ static void php_message_handler_for_zend(long message, void *data) # if defined(PHP_WIN32) OutputDebugString(memory_leak_buf); # else - fprintf(stderr, memory_leak_buf); + fprintf(stderr, "%s", memory_leak_buf); # endif #endif } diff --git a/main/streams/streams.c b/main/streams/streams.c index b46dcc97aa..26dd0c822c 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -174,7 +174,7 @@ PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int option va_end(args); if (options & REPORT_ERRORS || wrapper == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, buffer); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", buffer); efree(buffer); } else { /* append to stack */ @@ -341,7 +341,7 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov # if defined(PHP_WIN32) OutputDebugString(leakbuf); # else - fprintf(stderr, leakbuf); + fprintf(stderr, "%s", leakbuf); # endif } else { STR_FREE(stream->__orig_path); diff --git a/sapi/servlet/servlet.c b/sapi/servlet/servlet.c index 6635f64085..e82a4dd1b1 100644 --- a/sapi/servlet/servlet.c +++ b/sapi/servlet/servlet.c @@ -109,7 +109,7 @@ void ThrowServletException (JNIEnv *jenv, char *msg) { static int sapi_servlet_ub_write(const char *str, uint str_length TSRMLS_DC) { if (!SG(server_context)) { - fprintf(stderr, str); + fprintf(stderr, "%s", str); return 0; } |