iliaa Sun Aug 31 16:45:52 2003 EDT Modified files: /php-src/ext/calendar calendar.c /php-src/ext/openssl openssl.c /php-src/ext/dio dio.c /php-src/ext/ldap ldap.c /php-src/ext/mssql php_mssql.c /php-src/ext/sockets sockets.c /php-src/ext/sysvsem sysvsem.c /php-src/ext/sysvshm sysvshm.c /php-src/ext/xmlrpc xmlrpc-epi-php.c Log: Fixed compiler warnings.
Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.37 php-src/ext/calendar/calendar.c:1.38 --- php-src/ext/calendar/calendar.c:1.37 Tue Jun 10 16:03:25 2003 +++ php-src/ext/calendar/calendar.c Sun Aug 31 16:45:42 2003 @@ -18,7 +18,7 @@ | Wez Furlong <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: calendar.c,v 1.37 2003/06/10 20:03:25 imajes Exp $ */ +/* $Id: calendar.c,v 1.38 2003/08/31 20:45:42 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -177,7 +177,7 @@ } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %d.", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal); RETURN_FALSE; } @@ -215,7 +215,7 @@ } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %d.", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal); RETURN_FALSE; } @@ -245,7 +245,7 @@ } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %d.", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal); RETURN_FALSE; } @@ -268,7 +268,7 @@ } if (cal < 0 || cal >= CAL_NUM_CALS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %d", cal); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld", cal); RETURN_FALSE; } calendar = &cal_conversion_table[cal]; Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.80 php-src/ext/openssl/openssl.c:1.81 --- php-src/ext/openssl/openssl.c:1.80 Sun Aug 31 08:41:42 2003 +++ php-src/ext/openssl/openssl.c Sun Aug 31 16:45:42 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c,v 1.80 2003/08/31 12:41:42 zeev Exp $ */ +/* $Id: openssl.c,v 1.81 2003/08/31 20:45:42 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2298,7 +2298,7 @@ cipher = EVP_des_ede3_cbc(); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid cipher type `%d'", cipherid); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid cipher type `%ld'", cipherid); goto clean_exit; } if (cipher == NULL) { Index: php-src/ext/dio/dio.c diff -u php-src/ext/dio/dio.c:1.28 php-src/ext/dio/dio.c:1.29 --- php-src/ext/dio/dio.c:1.28 Tue Jun 10 16:03:27 2003 +++ php-src/ext/dio/dio.c Sun Aug 31 16:45:44 2003 @@ -157,7 +157,7 @@ } if (fd == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot open file %s with flags %d and permissions %d: %s", file_name, flags, mode, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot open file %s with flags %ld and permissions %ld: %s", file_name, flags, mode, strerror(errno)); RETURN_FALSE; } @@ -237,7 +237,7 @@ ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd); if (ftruncate(f->fd, offset) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "couldn't truncate %d to %d bytes: %s", f->fd, offset, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "couldn't truncate %d to %ld bytes: %s", f->fd, offset, strerror(errno)); RETURN_FALSE; } Index: php-src/ext/ldap/ldap.c diff -u php-src/ext/ldap/ldap.c:1.145 php-src/ext/ldap/ldap.c:1.146 --- php-src/ext/ldap/ldap.c:1.145 Sun Aug 31 08:41:36 2003 +++ php-src/ext/ldap/ldap.c Sun Aug 31 16:45:45 2003 @@ -22,7 +22,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ldap.c,v 1.145 2003/08/31 12:41:36 zeev Exp $ */ +/* $Id: ldap.c,v 1.146 2003/08/31 20:45:45 iliaa Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -302,7 +302,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "LDAP Support", "enabled"); - php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.145 2003/08/31 12:41:36 zeev Exp $"); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.146 2003/08/31 20:45:45 iliaa Exp $"); if (LDAPG(max_links) == -1) { snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links)); @@ -394,7 +394,7 @@ #endif if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", LDAPG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", LDAPG(num_links)); RETURN_FALSE; } Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.122 php-src/ext/mssql/php_mssql.c:1.123 --- php-src/ext/mssql/php_mssql.c:1.122 Sun Aug 31 08:41:39 2003 +++ php-src/ext/mssql/php_mssql.c Sun Aug 31 16:45:47 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.122 2003/08/31 12:41:39 zeev Exp $ */ +/* $Id: php_mssql.c,v 1.123 2003/08/31 20:45:47 iliaa Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -485,13 +485,13 @@ 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; @@ -606,7 +606,7 @@ } } 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; } Index: php-src/ext/sockets/sockets.c diff -u php-src/ext/sockets/sockets.c:1.152 php-src/ext/sockets/sockets.c:1.153 --- php-src/ext/sockets/sockets.c:1.152 Sun Aug 31 08:41:47 2003 +++ php-src/ext/sockets/sockets.c Sun Aug 31 16:45:48 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c,v 1.152 2003/08/31 12:41:47 zeev Exp $ */ +/* $Id: sockets.c,v 1.153 2003/08/31 20:45:48 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1033,12 +1033,12 @@ && arg1 != AF_INET6 #endif && arg1 != AF_INET) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket domain [%d] specified for argument 1, assuming AF_INET", arg1); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket domain [%ld] specified for argument 1, assuming AF_INET", arg1); arg1 = AF_INET; } if (arg2 > 10) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket type [%d] specified for argument 2, assuming SOCK_STREAM", arg2); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket type [%ld] specified for argument 2, assuming SOCK_STREAM", arg2); arg2 = SOCK_STREAM; } @@ -1651,12 +1651,12 @@ && domain != AF_INET6 #endif && domain != AF_UNIX) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket domain [%d] specified for argument 1, assuming AF_INET", domain); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket domain [%ld] specified for argument 1, assuming AF_INET", domain); domain = AF_INET; } if (type > 10) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket type [%d] specified for argument 2, assuming SOCK_STREAM", type); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid socket type [%ld] specified for argument 2, assuming SOCK_STREAM", type); type = SOCK_STREAM; } Index: php-src/ext/sysvsem/sysvsem.c diff -u php-src/ext/sysvsem/sysvsem.c:1.47 php-src/ext/sysvsem/sysvsem.c:1.48 --- php-src/ext/sysvsem/sysvsem.c:1.47 Sat Jul 19 15:23:33 2003 +++ php-src/ext/sysvsem/sysvsem.c Sun Aug 31 16:45:49 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvsem.c,v 1.47 2003/07/19 19:23:33 andrey Exp $ */ +/* $Id: sysvsem.c,v 1.48 2003/08/31 20:45:49 iliaa Exp $ */ /* Latest update build anc tested on Linux 2.2.14 * @@ -193,7 +193,7 @@ semid = semget(key, 3, perm|IPC_CREAT); if (semid == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%lx: %s", key, strerror(errno)); RETURN_FALSE; } @@ -225,7 +225,7 @@ sop[2].sem_flg = SEM_UNDO; while (semop(semid, sop, 3) == -1) { if (errno != EINTR) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed acquiring SYSVSEM_SETVAL for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed acquiring SYSVSEM_SETVAL for key 0x%lx: %s", key, strerror(errno)); break; } } @@ -237,7 +237,7 @@ count = semctl(semid, SYSVSEM_USAGE, GETVAL, NULL); #endif if (count == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%lx: %s", key, strerror(errno)); } /* If we are the only user, then take this opportunity to set the max. */ @@ -248,17 +248,17 @@ union semun semarg; semarg.val = max_acquire; if (semctl(semid, SYSVSEM_SEM, SETVAL, semarg) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "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_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "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_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%lx: %s", key, strerror(errno)); } #endif } @@ -270,7 +270,7 @@ sop[0].sem_flg = SEM_UNDO; while (semop(semid, sop, 1) == -1) { if (errno != EINTR) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed releasing SYSVSEM_SETVAL for key 0x%x: %s", key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed releasing SYSVSEM_SETVAL for key 0x%lx: %s", key, strerror(errno)); break; } } @@ -307,7 +307,7 @@ 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; } @@ -317,7 +317,7 @@ while (semop(sem_ptr->semid, &sop, 1) == -1) { if (errno != EINTR) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x: %s", acquire ? "acquire" : "release", sem_ptr->key, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to %s key 0x%x: %s", acquire ? "acquire" : "release", sem_ptr->key, strerror(errno)); RETURN_FALSE; } } @@ -372,7 +372,7 @@ #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; } @@ -381,7 +381,7 @@ #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: php-src/ext/sysvshm/sysvshm.c diff -u php-src/ext/sysvshm/sysvshm.c:1.64 php-src/ext/sysvshm/sysvshm.c:1.65 --- php-src/ext/sysvshm/sysvshm.c:1.64 Sat Jul 19 15:23:33 2003 +++ php-src/ext/sysvshm/sysvshm.c Sun Aug 31 16:45:50 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvshm.c,v 1.64 2003/07/19 19:23:33 andrey Exp $ */ +/* $Id: sysvshm.c,v 1.65 2003/08/31 20:45:50 iliaa Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -215,7 +215,7 @@ } if (shmctl(shm_list_ptr->id, IPC_RMID,NULL) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x, id %i: %s", shm_list_ptr->key, id, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%x, id %ld: %s", shm_list_ptr->key, id, strerror(errno)); RETURN_FALSE; } @@ -246,7 +246,7 @@ shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type); if (type != php_sysvshm.le_shm) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a SysV shared memory index", id); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a SysV shared memory index", id); RETURN_FALSE; } @@ -293,7 +293,7 @@ shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type); if (type != php_sysvshm.le_shm) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a SysV shared memory index", id); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a SysV shared memory index", id); RETURN_FALSE; } @@ -302,7 +302,7 @@ shm_varpos = php_check_shm_data((shm_list_ptr->ptr), key); if (shm_varpos < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "variable key %d doesn't exist", key); + php_error_docref(NULL TSRMLS_CC, 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 @@ shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type); if (type != php_sysvshm.le_shm) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a SysV shared memory index", id); + php_error_docref(NULL TSRMLS_CC, 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_docref(NULL TSRMLS_CC, E_WARNING, "variable key %d doesn't exist", key); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "variable key %ld doesn't exist", key); RETURN_FALSE; } php_remove_shm_data((shm_list_ptr->ptr), shm_varpos); Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.34 php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.35 --- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.34 Sun Aug 31 08:41:52 2003 +++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Sun Aug 31 16:45:51 2003 @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xmlrpc-epi-php.c,v 1.34 2003/08/31 12:41:52 zeev Exp $ */ +/* $Id: xmlrpc-epi-php.c,v 1.35 2003/08/31 20:45:51 iliaa Exp $ */ /********************************************************************** * BUGS: * @@ -921,7 +921,7 @@ else { /* could not create description */ if(err.xml_elem_error.parser_code) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "xml parse error: [line %i, column %i, message: %s] Unable to add introspection data returned from %s()", + php_error_docref(NULL TSRMLS_CC, 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 { @@ -1189,7 +1189,7 @@ } else { /* could not create description */ if(err.xml_elem_error.parser_code) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "xml parse error: [line %i, column %i, message: %s] Unable to create introspection data", + php_error_docref(NULL TSRMLS_CC, 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 { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid xml structure. Unable to create introspection data");
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php