@@ -80,7 +80,8 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type TSRMLS_DC)
80
80
ini_entry -> displayer (ini_entry , type );
81
81
} else {
82
82
char * display_string ;
83
- uint display_string_length , esc_html = 0 ;
83
+ size_t display_string_length ;
84
+ int esc_html = 0 ;
84
85
85
86
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry -> modified ) {
86
87
if (ini_entry -> orig_value && ini_entry -> orig_value -> val [0 ]) {
@@ -281,7 +282,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t
281
282
/* fprintf(stdout, "ZEND_INI_PARSER_SECTION: %s\n",Z_STRVAL_P(arg1)); */
282
283
283
284
char * key = NULL ;
284
- uint key_len ;
285
+ size_t key_len ;
285
286
286
287
/* PATH sections */
287
288
if (!strncasecmp (Z_STRVAL_P (arg1 ), "PATH" , sizeof ("PATH" ) - 1 )) {
@@ -355,14 +356,14 @@ static void php_load_php_extension_cb(void *arg TSRMLS_DC)
355
356
static void php_load_zend_extension_cb (void * arg TSRMLS_DC )
356
357
{
357
358
char * filename = * ((char * * ) arg );
358
- const int length = strlen (filename );
359
+ const int length = ( int ) strlen (filename );
359
360
360
361
if (IS_ABSOLUTE_PATH (filename , length )) {
361
362
zend_load_extension (filename TSRMLS_CC );
362
363
} else {
363
364
char * libpath ;
364
365
char * extension_dir = INI_STR ("extension_dir" );
365
- int extension_dir_len = strlen (extension_dir );
366
+ int extension_dir_len = ( int ) strlen (extension_dir );
366
367
367
368
if (IS_SLASH (extension_dir [extension_dir_len - 1 ])) {
368
369
spprintf (& libpath , 0 , "%s%s" , extension_dir , filename );
@@ -449,7 +450,7 @@ int php_init_config(TSRMLS_D)
449
450
* Prepare search path
450
451
*/
451
452
452
- search_path_size = MAXPATHLEN * 4 + strlen (env_location ) + 3 + 1 ;
453
+ search_path_size = MAXPATHLEN * 4 + ( int ) strlen (env_location ) + 3 + 1 ;
453
454
php_ini_search_path = (char * ) emalloc (search_path_size );
454
455
free_ini_search_path = 1 ;
455
456
php_ini_search_path [0 ] = 0 ;
@@ -608,7 +609,7 @@ int php_init_config(TSRMLS_D)
608
609
/* Or fall back using possible --with-config-file-scan-dir setting (defaults to empty string!) */
609
610
php_ini_scanned_path = PHP_CONFIG_FILE_SCAN_DIR ;
610
611
}
611
- php_ini_scanned_path_len = strlen (php_ini_scanned_path );
612
+ php_ini_scanned_path_len = ( int ) strlen (php_ini_scanned_path );
612
613
613
614
/* Scan and parse any .ini files found in scan path if path not empty. */
614
615
if (!sapi_module .php_ini_ignore && php_ini_scanned_path_len ) {
@@ -638,7 +639,7 @@ int php_init_config(TSRMLS_D)
638
639
to allow "/foo/phd.d:" or ":/foo/php.d" */
639
640
debpath = PHP_CONFIG_FILE_SCAN_DIR ;
640
641
}
641
- lenpath = strlen (debpath );
642
+ lenpath = ( int ) strlen (debpath );
642
643
643
644
if (lenpath > 0 && (ndir = php_scandir (debpath , & namelist , 0 , php_alphasort )) > 0 ) {
644
645
@@ -665,7 +666,7 @@ int php_init_config(TSRMLS_D)
665
666
666
667
if (zend_parse_ini_file (& fh2 , 1 , ZEND_INI_SCANNER_NORMAL , (zend_ini_parser_cb_t ) php_ini_parser_cb , & configuration_hash TSRMLS_CC ) == SUCCESS ) {
667
668
/* Here, add it to the list of ini files read */
668
- l = strlen (ini_file );
669
+ l = ( int ) strlen (ini_file );
669
670
total_l += l + 2 ;
670
671
p = estrndup (ini_file , l );
671
672
zend_llist_add_element (& scanned_ini_list , & p );
@@ -681,7 +682,7 @@ int php_init_config(TSRMLS_D)
681
682
efree (bufpath );
682
683
683
684
if (total_l ) {
684
- int php_ini_scanned_files_len = (php_ini_scanned_files ) ? strlen (php_ini_scanned_files ) + 1 : 0 ;
685
+ int php_ini_scanned_files_len = (php_ini_scanned_files ) ? ( int ) strlen (php_ini_scanned_files ) + 1 : 0 ;
685
686
php_ini_scanned_files = (char * ) realloc (php_ini_scanned_files , php_ini_scanned_files_len + total_l + 1 );
686
687
if (!php_ini_scanned_files_len ) {
687
688
* php_ini_scanned_files = '\0' ;
0 commit comments