Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Stas Malyshev
Hi!

 Commit:9fb5cfdeb1f13f2e3ab3751494cdd366bc78cb38
 Author:Xinchen Hui larue...@php.net Fri, 14 Dec 2012 17:21:43 
 +0800
 Parents:   359d91a80756cd9a9ce945c0e3aa1d2038633e7a
 Branches:  PHP-5.5
 
 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=9fb5cfdeb1f13f2e3ab3751494cdd366bc78cb38
 
 Log:
 Fixed warning of no return in non-void funciton

Why this is necessary? zend_error_noreturn already has an attribute that
is meant to do exactly that.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Laruence
Zend/zend_generators.c:734: warning: control reaches end of non-void function

yes it's nothing difference , just make the compiler happy

thanks

On Fri, Dec 14, 2012 at 5:35 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Commit:9fb5cfdeb1f13f2e3ab3751494cdd366bc78cb38
 Author:Xinchen Hui larue...@php.net Fri, 14 Dec 2012 17:21:43 
 +0800
 Parents:   359d91a80756cd9a9ce945c0e3aa1d2038633e7a
 Branches:  PHP-5.5

 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=9fb5cfdeb1f13f2e3ab3751494cdd366bc78cb38

 Log:
 Fixed warning of no return in non-void funciton

 Why this is necessary? zend_error_noreturn already has an attribute that
 is meant to do exactly that.

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Stas Malyshev
Hi!

 Zend/zend_generators.c:734: warning: control reaches end of non-void function
 
 yes it's nothing difference , just make the compiler happy

zend_error_noreturn already supposed to do that. Why it does not do it
in your case? Which compiler do you use?

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Pierre Joye
On Fri, Dec 14, 2012 at 10:40 AM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Zend/zend_generators.c:734: warning: control reaches end of non-void function

 yes it's nothing difference , just make the compiler happy

 zend_error_noreturn already supposed to do that. Why it does not do it
 in your case? Which compiler do you use?

a couple of compilers or analyzers are confused by this macro, not
sure why, but reducing the noises at no cost help to get a better view
in future checks.


--
Pierre

@pierrejoye

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Stas Malyshev
Hi!

 a couple of compilers or analyzers are confused by this macro, not
 sure why, but reducing the noises at no cost help to get a better view
 in future checks.

There is a cost - now we have both zend_error_noreturn and return
statements, which is unneeded. If we say zend_error_noreturn does not
work, we should remove it and use zend_error, and not complicate the
code base. If we say zend_error_noreturn does work, then we should not
add plugs after it. Having both zend_error_noreturn and plugs only makes
code completely confusing and hard to read for everybody - why we have
return after code that we marked as noreturn? Why we have special
noreturn function if we have to use plugs anyway?

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed warning of no return in non-void funciton: Zend/zend_vm_def.h Zend/zend_vm_execute.h Zend/zend_vm_gen.php

2012-12-14 Thread Laruence
On Fri, Dec 14, 2012 at 5:40 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
 Hi!

 Zend/zend_generators.c:734: warning: control reaches end of non-void function

 yes it's nothing difference , just make the compiler happy

 zend_error_noreturn already supposed to do that. Why it does not do it
 in your case? Which compiler do you use?
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.11.00)

thanks

 --
 Stanislav Malyshev, Software Architect
 SugarCRM: http://www.sugarcrm.com/
 (408)454-6900 ext. 227



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php