summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-12-05 16:25:32 +0000
committerSascha Schumann <sas@php.net>1999-12-05 16:25:32 +0000
commit4a60eed46934950013039f8ca26b7c61f3d06d39 (patch)
tree5357b89373e1b5ea49dde2bae76cacfe94eba228
parent9417570dc1f31a0e3ddb9f6736a547c87ce7cfba (diff)
downloadphp-git-4a60eed46934950013039f8ca26b7c61f3d06d39.tar.gz
Fix some warnings
-rw-r--r--ext/ereg/ereg.c2
-rw-r--r--ext/pcre/php_pcre.c4
-rw-r--r--ext/pgsql/pgsql.c15
-rw-r--r--ext/session/session.c3
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/file.c2
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/lcg.c2
-rw-r--r--ext/standard/reg.c2
-rw-r--r--main/SAPI.c2
-rw-r--r--main/main.c10
-rw-r--r--main/rfc1867.c2
-rw-r--r--sapi/cgi/cgi_main.c2
13 files changed, 17 insertions, 33 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c
index d327701af8..58c8fc82f2 100644
--- a/ext/ereg/ereg.c
+++ b/ext/ereg/ereg.c
@@ -105,7 +105,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals)
static PHP_MINIT_FUNCTION(regex)
{
#ifdef ZTS
- reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL);
+ reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL);
#else
php_reg_init_globals(&reg_globals);
#endif
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 1dd70ec31a..7adc62b7a7 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -102,8 +102,8 @@ static PHP_MINIT_FUNCTION(pcre)
#ifdef ZTS
pcre_globals_id = ts_allocate_id(
sizeof(php_pcre_globals),
- _php_pcre_init_globals,
- _php_pcre_shutdown_globals);
+ (ts_allocate_ctor) _php_pcre_init_globals,
+ (ts_allocate_dtor) _php_pcre_shutdown_globals);
#else
zend_hash_init(&PCRE_G(pcre_cache), 0, NULL, _php_free_pcre_cache, 1);
#endif
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 868b1d002f..7c0d9dcefe 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -140,7 +140,7 @@ PHP_MINIT_FUNCTION(pgsql)
ELS_FETCH();
#ifdef ZTS
- pgsql_globals_id = ts_allocate_id(sizeof(php_pgsql_globals), php_pgsql_init_globals, NULL);
+ pgsql_globals_id = ts_allocate_id(sizeof(php_pgsql_globals), (ts_allocate_ctor) php_pgsql_init_globals, NULL);
#else
php_pgsql_init_globals(PGLS_C);
#endif
@@ -633,7 +633,6 @@ void php3_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -701,7 +700,6 @@ char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
char hashed_oid_key[32];
list_entry *field_type;
char *ret=NULL;
- PGLS_FETCH();
/* try to lookup the type in the resource list */
snprintf(hashed_oid_key,31,"pgsql_oid_%d",(int) oid);
@@ -752,7 +750,6 @@ void php3_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -827,7 +824,6 @@ PHP_FUNCTION(pgsql_field_number)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -856,7 +852,6 @@ PHP_FUNCTION(pgsql_result)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type,field_offset;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &result, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -908,7 +903,6 @@ static void php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
char *element,*field_name;
uint element_len;
PLS_FETCH();
- PGLS_FETCH();
switch (ARG_COUNT(ht)) {
case 2:
@@ -1017,7 +1011,6 @@ void php3_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type,field_offset;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &result, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1085,7 +1078,6 @@ PHP_FUNCTION(pgsql_free_result)
pval *result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1114,7 +1106,6 @@ PHP_FUNCTION(pgsql_last_oid)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1348,7 +1339,6 @@ PHP_FUNCTION(pgsql_lo_close)
pval *pgsql_lofp;
int id, type;
pgLofp *pgsql;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
@@ -1388,7 +1378,6 @@ PHP_FUNCTION(pgsql_lo_read)
int id, buf_len, type, nbytes;
char *buf;
pgLofp *pgsql;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
@@ -1431,7 +1420,6 @@ PHP_FUNCTION(pgsql_lo_write)
int id, buf_len, nbytes, type;
char *buf;
pgLofp *pgsql;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
@@ -1473,7 +1461,6 @@ PHP_FUNCTION(pgsql_lo_readall)
char buf[8192];
pgLofp *pgsql;
int output=1;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
diff --git a/ext/session/session.c b/ext/session/session.c
index a09a9ec719..c69da0c04a 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -968,8 +968,6 @@ PHP_FUNCTION(session_unset)
static void php_rinit_session_globals(PSLS_D)
{
- ELS_FETCH();
-
PS(mod) = _php_find_ps_module(INI_STR("session.save_handler") PSLS_CC);
PS(serializer) = \
_php_find_ps_serializer(INI_STR("session.serialize_handler") PSLS_CC);
@@ -1016,7 +1014,6 @@ void _php_session_auto_start(void *data)
PHP_RINIT_FUNCTION(session)
{
PSLS_FETCH();
- PLS_FETCH();
php_rinit_session_globals(PSLS_C);
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 3717f0899b..4f40dd2d98 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -129,7 +129,7 @@ PHP_MINIT_FUNCTION(dir)
dir_class_entry_ptr = register_internal_class(&dir_class_entry);
#ifdef ZTS
- dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), php_dir_init_globals, NULL);
+ dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), (ts_allocate_ctor) php_dir_init_globals, NULL);
#else
DIR(default_dir) = 0;
#endif
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 60e6eb68fe..df2c2af36a 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -325,7 +325,7 @@ PHP_MINIT_FUNCTION(file)
le_uploads = register_list_destructors(_file_upload_dtor, NULL);
#ifdef ZTS
- file_globals_id = ts_allocate_id(sizeof(php_file_globals), php_file_init_globals, NULL);
+ file_globals_id = ts_allocate_id(sizeof(php_file_globals), (ts_allocate_ctor) php_file_init_globals, NULL);
#else
FIL(fgetss_state) = 0;
FIL(pclose_ret) = 0;
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index deedcc8466..7366859f39 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -731,7 +731,7 @@ static void fsock_globals_dtor(FLS_D)
PHP_MINIT_FUNCTION(fsock)
{
#ifdef ZTS
- fsock_globals_id = ts_allocate_id(sizeof(php_fsock_globals), fsock_globals_ctor, fsock_globals_dtor);
+ fsock_globals_id = ts_allocate_id(sizeof(php_fsock_globals), (ts_allocate_ctor) fsock_globals_ctor, (ts_allocate_dtor) fsock_globals_dtor);
#else
fsock_globals_ctor(FLS_C);
#endif
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index 0f046448e6..4e0d1b4ccc 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -72,7 +72,7 @@ static void lcg_init_globals(LCGLS_D)
static int php_minit_lcg(INIT_FUNC_ARGS)
{
#ifdef ZTS
- lcg_globals_id = ts_allocate_id(sizeof(php_lcg_globals), lcg_init_globals, NULL);
+ lcg_globals_id = ts_allocate_id(sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL);
#else
lcg_init_globals();
#endif
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index d327701af8..58c8fc82f2 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.c
@@ -105,7 +105,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals)
static PHP_MINIT_FUNCTION(regex)
{
#ifdef ZTS
- reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL);
+ reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL);
#else
php_reg_init_globals(&reg_globals);
#endif
diff --git a/main/SAPI.c b/main/SAPI.c
index 207eb9e6b8..01be19857e 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -79,7 +79,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf)
module_global_startup_modules();
}
-SAPI_API void sapi_shutdown()
+SAPI_API void sapi_shutdown(void)
{
module_global_shutdown_modules();
zend_hash_destroy(&known_post_content_types);
diff --git a/main/main.c b/main/main.c
index ce8e0ff230..08674d470a 100644
--- a/main/main.c
+++ b/main/main.c
@@ -523,7 +523,7 @@ static void php_set_timeout(long seconds)
}
-static void php_unset_timeout()
+static void php_unset_timeout(void)
{
#if WIN32|WINNT
#else
@@ -778,7 +778,7 @@ void php_request_shutdown_for_exec(void *dummy)
}
-int return_one(void *p)
+static int return_one(void *p)
{
return 1;
}
@@ -817,7 +817,7 @@ void php_request_shutdown(void *dummy)
}
-static int php3_config_ini_startup()
+static int php3_config_ini_startup(void)
{
if (php3_init_config() == FAILURE) {
php_printf("PHP: Unable to parse configuration file.\n");
@@ -826,7 +826,7 @@ static int php3_config_ini_startup()
return SUCCESS;
}
-static void php3_config_ini_shutdown()
+static void php3_config_ini_shutdown(void)
{
php3_shutdown_config();
}
@@ -895,7 +895,7 @@ int php_module_startup(sapi_module_struct *sf)
#ifdef ZTS
tsrm_set_new_thread_end_handler(php_new_thread_end_handler);
executor_globals = ts_resource(executor_globals_id);
- core_globals_id = ts_allocate_id(sizeof(php_core_globals), core_globals_ctor, NULL);
+ core_globals_id = ts_allocate_id(sizeof(php_core_globals), (ts_allocate_ctor) core_globals_ctor, NULL);
core_globals = ts_resource(core_globals_id);
#endif
EG(error_reporting) = E_ALL & ~E_NOTICE;
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 2ddd66d467..ea80949393 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -32,7 +32,7 @@
/*
* Split raw mime stream up into appropriate components
*/
-void php_mime_split(char *buf, int cnt, char *boundary)
+static void php_mime_split(char *buf, int cnt, char *boundary)
{
char *ptr, *loc, *loc2, *s, *name, *filename, *u, *fn;
int len, state = 0, Done = 0, rem, urem;
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index df9e271ebf..1ffaba3d25 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -188,7 +188,7 @@ static void init_request_info(SLS_D)
}
-void define_command_line_ini_entry(char *arg)
+static void define_command_line_ini_entry(char *arg)
{
char *name, *value;