]> granicus.if.org Git - php/commitdiff
- Fixed compiler warnings
authorFelipe Pena <felipe@php.net>
Wed, 12 Jan 2011 00:29:59 +0000 (00:29 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 12 Jan 2011 00:29:59 +0000 (00:29 +0000)
ext/intl/locale/locale_methods.c
ext/intl/transliterator/transliterator_methods.c

index ff98edfd5d0445b3dc11f7c526491bc5ab7c9c0e..88522339be0d88d69a98ff9743493bce316e373c 100755 (executable)
@@ -264,7 +264,7 @@ static char* get_icu_value_internal( char* loc_name , char* tag_name, int* resul
        UErrorCode      status          = U_ZERO_ERROR;
 
 
-       if( tag_name != LOC_CANONICALIZE_TAG ){
+       if( strcmp(tag_name, LOC_CANONICALIZE_TAG) != 0 ){
                /* Handle  grandfathered languages */
                grOffset =  findOffset( LOC_GRANDFATHERED , loc_name );
                if( grOffset >= 0 ){
@@ -501,7 +501,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
        loc_name = INTL_G(default_locale);
        }
 
-       if( tag_name != DISP_NAME ){
+       if( strcmp(tag_name, DISP_NAME) != 0 ){
                /* Handle grandfathered languages */
                grOffset = findOffset( LOC_GRANDFATHERED , loc_name );
                if( grOffset >= 0 ){
@@ -1042,9 +1042,10 @@ static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS
                                sprintf( cur_key_name , "%s%d", key_name , cnt++);      
                                add_assoc_string( hash_arr, cur_key_name , token , TRUE );
                        }
-
-                       if( key_name == LOC_PRIVATE_TAG ){
+/*
+                       if( strcmp(key_name, LOC_PRIVATE_TAG) == 0 ){
                        }
+*/
                }
        } else {
                if( result == 1 ){
index fbe2cf198444decc71dc44e031367914518ca815..e7ea329cef7c88208f6e9575a4ffb3f5ab1d6107 100644 (file)
@@ -259,7 +259,7 @@ PHP_FUNCTION( transliterator_list_ids )
                "transliterator_list_ids: Failed to obtain registered transliterators" );
 
        array_init( return_value );
-       while( elem = uenum_unext( en, &elem_len, &status ) )
+       while( (elem = uenum_unext( en, &elem_len, &status )) )
        {
                char *el_char = NULL;
                int  el_len   = 0;
@@ -365,7 +365,7 @@ PHP_FUNCTION( transliterator_transliterate )
                RETURN_FALSE;
        }
 
-       if( start < 0 || (limit != -1 ) && (start > limit ) )
+       if( start < 0 || ((limit != -1 ) && (start > limit )) )
        {
                intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
                        "transliterator_transliterate: \"start\" argument should be "