]> granicus.if.org Git - php/commitdiff
Fix some warnings
authorSascha Schumann <sas@php.net>
Sun, 5 Dec 1999 16:25:32 +0000 (16:25 +0000)
committerSascha Schumann <sas@php.net>
Sun, 5 Dec 1999 16:25:32 +0000 (16:25 +0000)
13 files changed:
ext/ereg/ereg.c
ext/pcre/php_pcre.c
ext/pgsql/pgsql.c
ext/session/session.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/fsock.c
ext/standard/lcg.c
ext/standard/reg.c
main/SAPI.c
main/main.c
main/rfc1867.c
sapi/cgi/cgi_main.c

index d327701af8d0895cdc8f1ffad79bf051f6c06a9b..58c8fc82f21ba011a344db7dc0353391de845d1d 100644 (file)
@@ -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
index 1dd70ec31acc4ea99470dca5faf35b74a87ef9fe..7adc62b7a701163e8e7bbfe3c8c14d1b98d864a2 100644 (file)
@@ -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
index 868b1d002f9ae3359b96fba89110b01d40d82695..7c0d9dcefe11b5f5e14c7161a72c67fdf2c51b18 100644 (file)
@@ -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:
index a09a9ec7196b88f1c055709b6d4bb8e36ec5b28d..c69da0c04aa66b8a389469d19b06323fe32ab285 100644 (file)
@@ -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);
 
index 3717f0899b6900d7bf7b36985733130b776fb4ad..4f40dd2d986d3929f82c18c1cbcf6a2b32d796be 100644 (file)
@@ -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
index 60e6eb68fe9213dbf1d0b9d12eb3ba7f889562e0..df2c2af36a3a5fa2338e12feda8de6ee8e68d81e 100644 (file)
@@ -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;
index deedcc8466014b10f61186837cbdabd1af8e524b..7366859f396e4095712a62d7f0253e28ab9108cc 100644 (file)
@@ -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
index 0f046448e67c893f15bd9cf43579d856049ea463..4e0d1b4ccc79db0d8aebf239182b351677a693b6 100644 (file)
@@ -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
index d327701af8d0895cdc8f1ffad79bf051f6c06a9b..58c8fc82f21ba011a344db7dc0353391de845d1d 100644 (file)
@@ -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
index 207eb9e6b83d1b5121a4729cc01507c1ae1f11b0..01be19857efa59b086922f0e539b9260d78ad9f4 100644 (file)
@@ -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);
index ce8e0ff23078e9cfe5545aa79fd576d3930d68f1..08674d470a899e14faa2752f645cdc623d35a27e 100644 (file)
@@ -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;
index 2ddd66d467e71b97e6ceb52cd6839f11b4c53eec..ea8094939320c0dd31a7a92b4fa0df5d8641a6a9 100644 (file)
@@ -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;
index df9e271ebf50a9c121992b3551deaa6360721756..1ffaba3d259d295b20bae215a74bde73b535ef88 100644 (file)
@@ -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;