Hi!

Building PHP 5.5 with newer compiler on Mac, I'm getting this warning:

/Users/smalyshev/php-5.5/ext/spl/php_spl.c:803:35: warning: format
specifies type 'unsigned int' but the argument has type 'intptr_t'
      (aka 'long') [-Wformat]
        spprintf(&hex, 32, "%016x%016x", hash_handle, hash_handlers);
                            ~~~~~        ^~~~~~~~~~~
                            %016lx
/Users/smalyshev/php-5.5/ext/spl/php_spl.c:803:48: warning: format
specifies type 'unsigned int' but the argument has type 'intptr_t'
      (aka 'long') [-Wformat]
        spprintf(&hex, 32, "%016x%016x", hash_handle, hash_handlers);
                                 ~~~~~                ^~~~~~~~~~~~~
                                 %016lx

Which suggests intptr_t there has wrong size. Looks like on 64-bit
intptr_t would be too long and hash_handlers may not have chance to be
in the hash. Anybody knows if there's a reason why this code is there?

BTW, llvm compiler produces tons of warnings on PHP source, I'm planning
to get to them, probably next weekend.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to