]> granicus.if.org Git - php/commitdiff
Compiler warning fixes.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 28 Aug 2003 20:01:37 +0000 (20:01 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 28 Aug 2003 20:01:37 +0000 (20:01 +0000)
14 files changed:
ext/calendar/calendar.c
ext/db/db.c
ext/dio/dio.c
ext/filepro/filepro.c
ext/hyperwave/hw.c
ext/ldap/ldap.c
ext/mssql/php_mssql.c
ext/pspell/pspell.c
ext/sockets/sockets.c
ext/sysvsem/sysvsem.c
ext/sysvshm/sysvshm.c
ext/xmlrpc/xmlrpc-epi-php.c
ext/xslt/sablot.c
ext/zlib/zlib.c

index 27280a59e4363bebd48888cd1431d61ac0d3041a..d96bb52644a1f4710192c7913afee61e9b0af214 100644 (file)
@@ -161,7 +161,7 @@ PHP_FUNCTION(cal_info)
        }
        convert_to_long_ex(cal);
        if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
-               zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
+               zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
                RETURN_FALSE;
        }
 
@@ -203,7 +203,7 @@ PHP_FUNCTION(cal_days_in_month)
        convert_to_long_ex(year);
 
        if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
-               zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
+               zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
                RETURN_FALSE;
        }
 
@@ -239,7 +239,7 @@ PHP_FUNCTION(cal_to_jd)
        convert_to_long_ex(year);
 
        if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
-               zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
+               zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
                RETURN_FALSE;
        }
 
@@ -265,7 +265,7 @@ PHP_FUNCTION(cal_from_jd)
        convert_to_long_ex(cal);
 
        if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
-               zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
+               zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
                RETURN_FALSE;
        }
        calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
index 06968f375d44c7fd5fc7d404ef2d789afda07645..78db87d1b6c2fcc9bafbd10cefa190dc750734e1 100644 (file)
@@ -513,7 +513,7 @@ PHP_FUNCTION(dbminsert)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
        
@@ -539,7 +539,7 @@ PHP_FUNCTION(dbmreplace)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
        
@@ -607,7 +607,7 @@ PHP_FUNCTION(dbmfetch)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
 
@@ -683,7 +683,7 @@ PHP_FUNCTION(dbmexists)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
 
@@ -732,7 +732,7 @@ PHP_FUNCTION(dbmdelete)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
 
@@ -779,7 +779,7 @@ PHP_FUNCTION(dbmfirstkey)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
 
@@ -841,7 +841,7 @@ PHP_FUNCTION(dbmnextkey)
 
        info = php_find_dbm(id TSRMLS_CC);
        if (!info) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id));
                RETURN_FALSE;
        }
 
index 6b91b160119f075494754e5b60923f3513312371..8b82f2d6b34170d7c3c798a53151f8af95c59923 100644 (file)
@@ -161,7 +161,7 @@ PHP_FUNCTION(dio_open)
        }
 
        if (fd == -1) {
-               php_error(E_WARNING, "%s(): cannot open file %s with flags %d and permissions %d: %s", 
+               php_error(E_WARNING, "%s(): cannot open file %s with flags %ld and permissions %ld: %s", 
                                  get_active_function_name(TSRMLS_C), file_name, flags, mode, strerror(errno));
                RETURN_FALSE;
        }
@@ -240,7 +240,7 @@ PHP_FUNCTION(dio_truncate)
        ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
 
        if (ftruncate(f->fd, offset) == -1) {
-               php_error(E_WARNING, "%s(): couldn't truncate %d to %d bytes: %s",
+               php_error(E_WARNING, "%s(): couldn't truncate %d to %ld bytes: %s",
                                  get_active_function_name(TSRMLS_C), f->fd, offset, strerror(errno));
                RETURN_FALSE;
        }
index 8c30de0afbbb902a6d7ef7d8ffd686f77f33a3b6..de79ee2033dee3d04b599c3829e0f556b16d8d0e 100644 (file)
@@ -386,7 +386,7 @@ PHP_FUNCTION(filepro_fieldname)
        }
 
        php_error(E_WARNING,
-                               "%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
+                               "%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
                                Z_LVAL_P(fno));
 
        RETVAL_FALSE;
@@ -426,7 +426,7 @@ PHP_FUNCTION(filepro_fieldtype)
                }
        }
        php_error(E_WARNING,
-                               "%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
+                               "%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
                                Z_LVAL_P(fno));
        RETVAL_FALSE;
 }
@@ -465,7 +465,7 @@ PHP_FUNCTION(filepro_fieldwidth)
                }
        }
        php_error(E_WARNING,
-                               "%s(): Unable to locate field number %d.", get_active_function_name(TSRMLS_C),
+                               "%s(): Unable to locate field number %ld.", get_active_function_name(TSRMLS_C),
                                Z_LVAL_P(fno));
        RETVAL_FALSE;
 }
index 3750c79126f3d9885c9f4ffc08fe073ef541d34b..935f7e229c166bf501fdc501b2d69750dcb30029 100644 (file)
@@ -766,7 +766,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        list_entry new_le;
 
                        if (HwSG(max_links)!=-1 && HwSG(num_links)>=HwSG(max_links)) {
-                               php_error(E_ERROR, "%s(): Too many open links (%d)", get_active_function_name(TSRMLS_C), HwSG(num_links));
+                               php_error(E_ERROR, "%s(): Too many open links (%ld)", get_active_function_name(TSRMLS_C), HwSG(num_links));
                                if(host) efree(host);
                                if(username) efree(username);
                                if(password) efree(password);
@@ -774,7 +774,7 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                                RETURN_FALSE;
                        }
                        if (HwSG(max_persistent!=-1) && HwSG(num_persistent)>=HwSG(max_persistent)) {
-                               php_error(E_ERROR, "%s(): Too many open persistent links (%d)", get_active_function_name(TSRMLS_C), HwSG(num_persistent));
+                               php_error(E_ERROR, "%s(): Too many open persistent links (%ld)", get_active_function_name(TSRMLS_C), HwSG(num_persistent));
                                if(host) efree(host);
                                if(username) efree(username);
                                if(password) efree(password);
index e6d6195d506444f63d865c3eb40c8822b11d7bd0..62eb93eca0a9e821a574cb5466fd2b49ede9d6bd 100644 (file)
@@ -374,7 +374,7 @@ PHP_FUNCTION(ldap_connect)
 #endif
 
        if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) {
-               php_error(E_WARNING, "%s(): Too many open links (%d)", get_active_function_name(TSRMLS_C), LDAPG(num_links));
+               php_error(E_WARNING, "%s(): Too many open links (%ld)", get_active_function_name(TSRMLS_C), LDAPG(num_links));
                RETURN_FALSE;
        }
 
index 583e66bf901522868d41080d0c22b499ce19de04..177437602f41aee13d81d48c28aa01eb86185480 100644 (file)
@@ -483,13 +483,13 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        list_entry new_le;
 
                        if (MS_SQL_G(max_links) != -1 && MS_SQL_G(num_links) >= MS_SQL_G(max_links)) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MS_SQL_G(num_links));
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MS_SQL_G(num_links));
                                efree(hashed_details);
                                dbfreelogin(mssql.login);
                                RETURN_FALSE;
                        }
                        if (MS_SQL_G(max_persistent) != -1 && MS_SQL_G(num_persistent) >= MS_SQL_G(max_persistent)) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%d)", MS_SQL_G(num_persistent));
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%ld)", MS_SQL_G(num_persistent));
                                efree(hashed_details);
                                dbfreelogin(mssql.login);
                                RETURN_FALSE;
@@ -604,7 +604,7 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        }
                }
                if (MS_SQL_G(max_links) != -1 && MS_SQL_G(num_links) >= MS_SQL_G(max_links)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MS_SQL_G(num_links));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MS_SQL_G(num_links));
                        efree(hashed_details);
                        RETURN_FALSE;
                }
@@ -1730,7 +1730,7 @@ PHP_FUNCTION(mssql_result)
        
        convert_to_long_ex(row);
        if (Z_LVAL_PP(row) < 0 || Z_LVAL_PP(row) >= result->num_rows) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad row offset (%d)", Z_LVAL_PP(row));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad row offset (%ld)", Z_LVAL_PP(row));
                RETURN_FALSE;
        }
 
index a6392894fc55fe28460d41d3f222e27231d8cef6..97ec990fd0811348929a1f0be865ff06b77b0470 100644 (file)
@@ -354,7 +354,7 @@ PHP_FUNCTION(pspell_new_config)
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(conf), &type);
 
        if (config == NULL || type != le_pspell_config) {
-               php_error(E_WARNING, "%d is not a PSPELL config index", Z_LVAL_PP(conf));
+               php_error(E_WARNING, "%ld is not a PSPELL config index", Z_LVAL_PP(conf));
                RETURN_FALSE;
        }
        
@@ -389,7 +389,7 @@ PHP_FUNCTION(pspell_check)
        convert_to_string_ex(word);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
                RETURN_FALSE;
        }
 
@@ -421,7 +421,7 @@ PHP_FUNCTION(pspell_suggest)
        convert_to_string_ex(word);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
        RETURN_FALSE;
        }
 
@@ -460,7 +460,7 @@ PHP_FUNCTION(pspell_store_replacement)
        convert_to_string_ex(corr);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
                RETURN_FALSE;
        }
 
@@ -492,7 +492,7 @@ PHP_FUNCTION(pspell_add_to_personal)
        convert_to_string_ex(word);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
                RETURN_FALSE;
        }
 
@@ -529,7 +529,7 @@ PHP_FUNCTION(pspell_add_to_session)
        convert_to_string_ex(word);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
                RETURN_FALSE;
        }
 
@@ -565,7 +565,7 @@ PHP_FUNCTION(pspell_clear_session)
        convert_to_long_ex(scin);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
                RETURN_FALSE;
        }
 
@@ -596,7 +596,7 @@ PHP_FUNCTION(pspell_save_wordlist)
        convert_to_long_ex(scin);
        manager = (PspellManager *) zend_list_find(Z_LVAL_PP(scin), &type);
        if(!manager){
-               php_error(E_WARNING, "%d is not a PSPELL result index",Z_LVAL_PP(scin));
+               php_error(E_WARNING, "%ld is not a PSPELL result index",Z_LVAL_PP(scin));
                RETURN_FALSE;
        }
 
@@ -679,7 +679,7 @@ PHP_FUNCTION(pspell_config_runtogether)
        convert_to_long_ex(sccin);
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
        if(!config){
-               php_error(E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
+               php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
                RETURN_FALSE;
        }
 
@@ -708,7 +708,7 @@ PHP_FUNCTION(pspell_config_mode)
        convert_to_long_ex(sccin);
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
        if(!config){
-               php_error(E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
+               php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
                RETURN_FALSE;
        }
 
@@ -749,7 +749,7 @@ PHP_FUNCTION(pspell_config_ignore)
        convert_to_long_ex(sccin);
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
        if(!config){
-               php_error(E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
+               php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
                RETURN_FALSE;
        }
 
@@ -795,7 +795,7 @@ PHP_FUNCTION(pspell_config_personal)
        convert_to_long_ex(sccin);
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
        if(!config){
-               php_error(E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
+               php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
                RETURN_FALSE;
        }
 
@@ -833,7 +833,7 @@ PHP_FUNCTION(pspell_config_repl)
        convert_to_long_ex(sccin);
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
        if(!config){
-               php_error(E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
+               php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
                RETURN_FALSE;
        }
 
@@ -873,7 +873,7 @@ PHP_FUNCTION(pspell_config_save_repl)
        convert_to_long_ex(sccin);
        config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
        if(!config){
-               php_error(E_WARNING, "%d is not a PSPELL config index",Z_LVAL_PP(sccin));
+               php_error(E_WARNING, "%ld is not a PSPELL config index",Z_LVAL_PP(sccin));
                RETURN_FALSE;
        }
 
index d8f41d8bca8958aba58964365190fb35bc4a8dbe..f2e1a706aec5b4483f0d057242fde3f6c272b1ef 100644 (file)
@@ -960,12 +960,12 @@ PHP_FUNCTION(socket_create)
     }
 
        if (arg1 != AF_UNIX && arg1 != AF_INET) {
-               php_error(E_WARNING, "%s() invalid socket domain [%d] specified for argument 1, assuming AF_INET", get_active_function_name(TSRMLS_C), arg1);
+               php_error(E_WARNING, "%s() invalid socket domain [%ld] specified for argument 1, assuming AF_INET", get_active_function_name(TSRMLS_C), arg1);
                arg1 = AF_INET;
        }
 
        if (arg2 > 10) {
-               php_error(E_WARNING, "%s() invalid socket type [%d] specified for argument 2, assuming SOCK_STREAM", get_active_function_name(TSRMLS_C), arg2);
+               php_error(E_WARNING, "%s() invalid socket type [%ld] specified for argument 2, assuming SOCK_STREAM", get_active_function_name(TSRMLS_C), arg2);
                arg2 = SOCK_STREAM;
        }
        
@@ -1979,12 +1979,12 @@ PHP_FUNCTION(socket_create_pair)
        php_sock[1] = (php_socket*)emalloc(sizeof(php_socket));
 
        if (domain != AF_INET && domain != AF_UNIX) {
-               php_error(E_WARNING, "%s() invalid socket domain [%d] specified for argument 1, assuming AF_INET", get_active_function_name(TSRMLS_C), domain);
+               php_error(E_WARNING, "%s() invalid socket domain [%ld] specified for argument 1, assuming AF_INET", get_active_function_name(TSRMLS_C), domain);
                domain = AF_INET;
        }
        
        if (type > 10) {
-               php_error(E_WARNING, "%s() invalid socket type [%d] specified for argument 2, assuming SOCK_STREAM", get_active_function_name(TSRMLS_C), type);
+               php_error(E_WARNING, "%s() invalid socket type [%ld] specified for argument 2, assuming SOCK_STREAM", get_active_function_name(TSRMLS_C), type);
                type = SOCK_STREAM;
        }
        
index 55c502d1321af6d672d94e310ff4c50fd4d886a9..949367d5733d7ed6a489b328055459c989025be4 100644 (file)
@@ -185,7 +185,7 @@ PHP_FUNCTION(sem_get)
 
     semid = semget(key, 3, perm|IPC_CREAT);
        if (semid == -1) {
-               php_error(E_WARNING, "semget() failed for key 0x%x: %s", key, strerror(errno));
+               php_error(E_WARNING, "semget() failed for key 0x%lx: %s", key, strerror(errno));
                RETURN_FALSE;
        }
 
@@ -217,7 +217,7 @@ PHP_FUNCTION(sem_get)
        sop[2].sem_flg = SEM_UNDO;
        while (semop(semid, sop, 3) == -1) {
                if (errno != EINTR) {
-                       php_error(E_WARNING, "semop() failed acquiring SYSVSEM_SETVAL for key 0x%x: %s", key, strerror(errno));
+                       php_error(E_WARNING, "semop() failed acquiring SYSVSEM_SETVAL for key 0x%lx: %s", key, strerror(errno));
                        break;
                }
        }
@@ -229,7 +229,7 @@ PHP_FUNCTION(sem_get)
        count = semctl(semid, SYSVSEM_USAGE, GETVAL, NULL);
 #endif
        if (count == -1) {
-               php_error(E_WARNING, "semctl(GETVAL) failed for key 0x%x: %s", key, strerror(errno));
+               php_error(E_WARNING, "semctl(GETVAL) failed for key 0x%lx: %s", key, strerror(errno));
        }
 
        /* If we are the only user, then take this opportunity to set the max. */
@@ -240,17 +240,17 @@ PHP_FUNCTION(sem_get)
                union semun semarg;
                semarg.val = max_acquire;
                if (semctl(semid, SYSVSEM_SEM, SETVAL, semarg) == -1) {
-                       php_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
+                       php_error(E_WARNING, "semctl(SETVAL) failed for key 0x%lx: %s", key, strerror(errno));
                }
 #elif defined(SETVAL_WANTS_PTR)
                /* This is correct for Solaris 2.6 which does not have union semun. */
                if (semctl(semid, SYSVSEM_SEM, SETVAL, &max_acquire) == -1) {
-                       php_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
+                       php_error(E_WARNING, "semctl(SETVAL) failed for key 0x%lx: %s", key, strerror(errno));
                }
 #else
                /* This works for i.e. AIX */
                if (semctl(semid, SYSVSEM_SEM, SETVAL, max_acquire) == -1) {
-                       php_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
+                       php_error(E_WARNING, "semctl(SETVAL) failed for key 0x%lx: %s", key, strerror(errno));
                }
 #endif
        }
@@ -262,7 +262,7 @@ PHP_FUNCTION(sem_get)
        sop[0].sem_flg = SEM_UNDO;
        while (semop(semid, sop, 1) == -1) {
                if (errno != EINTR) {
-                       php_error(E_WARNING, "semop() failed releasing SYSVSEM_SETVAL for key 0x%x: %s", key, strerror(errno));
+                       php_error(E_WARNING, "semop() failed releasing SYSVSEM_SETVAL for key 0x%lx: %s", key, strerror(errno));
                        break;
                }
        }
@@ -299,7 +299,7 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
        ZEND_FETCH_RESOURCE(sem_ptr, sysvsem_sem *, arg_id, -1, "SysV semphore", php_sysvsem_module.le_sem);
 
        if (!acquire && sem_ptr->count == 0) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "SysV semaphore %d (key 0x%x) is not currently acquired", Z_LVAL_PP(arg_id), sem_ptr->key);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "SysV semaphore %ld (key 0x%x) is not currently acquired", Z_LVAL_PP(arg_id), sem_ptr->key);
                RETURN_FALSE;
        }
 
@@ -365,7 +365,7 @@ PHP_FUNCTION(sem_remove)
 #else
        if(semctl(sem_ptr->semid, 0, IPC_STAT, NULL) < 0) {
 #endif
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "SysV semphore %d does not (any longer) exist", Z_LVAL_PP(arg_id));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "SysV semphore %ld does not (any longer) exist", Z_LVAL_PP(arg_id));
                RETURN_FALSE;
        }
 
@@ -374,7 +374,7 @@ PHP_FUNCTION(sem_remove)
 #else
        if(semctl(sem_ptr->semid, 0, IPC_RMID, NULL) < 0) {
 #endif
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for SysV sempphore %d: %s", Z_LVAL_PP(arg_id), strerror(errno));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for SysV sempphore %ld: %s", Z_LVAL_PP(arg_id), strerror(errno));
                RETURN_FALSE;
        }
        
index 4397af3f9125810fe3f55284680f9abdd6fbae03..b587a3dbac7c6060f1d0366f2ccdf73b6eedefab 100644 (file)
@@ -215,7 +215,7 @@ PHP_FUNCTION(shm_remove)
        }
 
        if(shmctl(shm_list_ptr->id,IPC_RMID,NULL)<0) {
-               php_error(E_WARNING, "shm_remove() failed for key 0x%x, id %i: %s", shm_list_ptr->key, id,strerror(errno));
+               php_error(E_WARNING, "shm_remove() failed for key 0x%x, id %ld: %s", shm_list_ptr->key, id,strerror(errno));
                RETURN_FALSE;
        } 
 
@@ -246,7 +246,7 @@ PHP_FUNCTION(shm_put_var)
 
        shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type);
        if (type!=php_sysvshm.le_shm) {
-               php_error(E_WARNING, "%d is not a SysV shared memory index", id);
+               php_error(E_WARNING, "%ld is not a SysV shared memory index", id);
                RETURN_FALSE;
        }
 
@@ -293,7 +293,7 @@ PHP_FUNCTION(shm_get_var)
 
        shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type);
        if (type!=php_sysvshm.le_shm) {
-               php_error(E_WARNING, "%d is not a SysV shared memory index", id);
+               php_error(E_WARNING, "%ld is not a SysV shared memory index", id);
                RETURN_FALSE;
        }
 
@@ -302,7 +302,7 @@ PHP_FUNCTION(shm_get_var)
        shm_varpos=php_check_shm_data((shm_list_ptr->ptr),key);
 
        if(shm_varpos<0) {
-               php_error(E_WARNING, "variable key %d doesn't exist", key);
+               php_error(E_WARNING, "variable key %ld doesn't exist", key);
                RETURN_FALSE;
        }
        shm_var=(sysvshm_chunk*)((char*)shm_list_ptr->ptr+shm_varpos);
@@ -339,14 +339,14 @@ PHP_FUNCTION(shm_remove_var)
 
        shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type);
        if (type!=php_sysvshm.le_shm) {
-               php_error(E_WARNING, "%d is not a SysV shared memory index", id);
+               php_error(E_WARNING, "%ld is not a SysV shared memory index", id);
                RETURN_FALSE;
        }
 
        shm_varpos=php_check_shm_data((shm_list_ptr->ptr),key);
 
        if(shm_varpos<0) {
-               php_error(E_WARNING, "variable key %d doesn't exist", key);
+               php_error(E_WARNING, "variable key %ld doesn't exist", key);
                RETURN_FALSE;
        }
        php_remove_shm_data((shm_list_ptr->ptr),shm_varpos);    
index fc7d57ae55bb2e0b803fbc44228be5c17060f784..0427919e442357ef4c605c45c0f7f927103fdb21 100644 (file)
@@ -931,7 +931,7 @@ static void php_xmlrpc_introspection_callback(XMLRPC_SERVER server, void* data)
             else {
                /* could not create description */
                if(err.xml_elem_error.parser_code) {
-                  zend_error(E_WARNING, "xml parse error: [line %i, column %i, message: %s] Unable to add introspection data returned from %s()", 
+                  zend_error(E_WARNING, "xml parse error: [line %ld, column %ld, message: %s] Unable to add introspection data returned from %s()", 
                              err.xml_elem_error.column, err.xml_elem_error.line, err.xml_elem_error.parser_error, Z_STRVAL_PP(php_function));
                }
                else {
@@ -1221,7 +1221,7 @@ PHP_FUNCTION(xmlrpc_parse_method_descriptions)
       else {
          /* could not create description */
          if(err.xml_elem_error.parser_code) {
-            zend_error(E_WARNING, "xml parse error: [line %i, column %i, message: %s] Unable to create introspection data", 
+            zend_error(E_WARNING, "xml parse error: [line %ld, column %ld, message: %s] Unable to create introspection data", 
                        err.xml_elem_error.column, err.xml_elem_error.line, err.xml_elem_error.parser_error);
          }
          else {
index 345f566eab226566ebb582c45c4a9490c79c6885..fbf6cee6fe116884bf6e14f9124db0d868dc44b1 100644 (file)
@@ -279,7 +279,7 @@ PHP_FUNCTION(xslt_set_sax_handlers)
                key_type = zend_hash_get_current_key(sax_handlers, &string_key, &num_key, 0);
                if (key_type == HASH_KEY_IS_LONG) {
                        convert_to_string_ex(handler);
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Skipping numerical index %d (with value %s)",
+                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Skipping numerical index %ld (with value %s)",
                                  num_key, Z_STRVAL_PP(handler));
                        continue;
                }
@@ -363,7 +363,7 @@ PHP_FUNCTION(xslt_set_scheme_handlers)
 
                key_type = zend_hash_get_current_key(scheme_handlers, &string_key, &num_key, 0);
                if (key_type == HASH_KEY_IS_LONG) {
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Numerical key %d (with value %s) being ignored",
+                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Numerical key %ld (with value %s) being ignored",
                                          num_key, Z_STRVAL_PP(handler));
                        continue;
                }
index 21aa02876b282e7a09e09d03a93992111a84b82a..7af76098023625e62d23087087cde8c43dda6353 100644 (file)
@@ -818,7 +818,7 @@ PHP_FUNCTION(gzencode)
        }
 
        if((level<-1)||(level>9)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "compression level(%d) must be within -1..9", level);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "compression level(%ld) must be within -1..9", level);
                RETURN_FALSE;
        }