From: Ilia Alshanetsky Date: Thu, 28 Aug 2003 20:01:37 +0000 (+0000) Subject: Compiler warning fixes. X-Git-Tag: php-4.3.4RC1~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa55a5a82674b3c73e21d9e5ffee20e3c686c3c6;p=php Compiler warning fixes. --- diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 27280a59e4..d96bb52644 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -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)]; diff --git a/ext/db/db.c b/ext/db/db.c index 06968f375d..78db87d1b6 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -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; } diff --git a/ext/dio/dio.c b/ext/dio/dio.c index 6b91b16011..8b82f2d6b3 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -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; } diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c index 8c30de0afb..de79ee2033 100644 --- a/ext/filepro/filepro.c +++ b/ext/filepro/filepro.c @@ -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; } diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 3750c79126..935f7e229c 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -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); diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index e6d6195d50..62eb93eca0 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -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; } diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 583e66bf90..177437602f 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -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; } diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index a6392894fc..97ec990fd0 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -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; } diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index d8f41d8bca..f2e1a706ae 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -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; } diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index 55c502d132..949367d573 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -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; } diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index 4397af3f91..b587a3dbac 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -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); diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index fc7d57ae55..0427919e44 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -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 { diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index 345f566eab..fbf6cee6fe 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -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; } diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 21aa02876b..7af7609802 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -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; }