[asterisk-bugs] [Asterisk 0017302]: [patch] Eliminate compiler warning in app_voicemail.c

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 6 15:09:38 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17302 
====================================================================== 
Reported By:                jcovert
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17302
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.7 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-05-06 14:27 CDT
Last Modified:              2010-05-06 15:09 CDT
====================================================================== 
Summary:                    [patch] Eliminate compiler warning in
app_voicemail.c
Description: 
There's a harmless but incorrect bit of code in app_voicemail which
produces the following compiler warning with the default compiler options
on Darwin:

app_voicemail.c: In function 'vm_execmain':
app_voicemail.c:9346: warning: control may reach end of non-void function
'vm_intro' being inlined

It is strongly recommended C coding practice to ensure that the final
statement in any non-void function is a return with a value.  While the
code here as currently written would always execute a return with a value,
it would be better quality and less likely to grow ugly scales due to a
future change if it were corrected as indicated in the attached patch.

The patch is relative to trunk.
====================================================================== 

---------------------------------------------------------------------- 
 (0121502) jcovert (reporter) - 2010-05-06 15:09
 https://issues.asterisk.org/view.php?id=17302#c121502 
---------------------------------------------------------------------- 
# gcc -v
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /var/tmp/gcc/gcc-5370~2/src/configure --disable-checking
-enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8
--target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5370) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-06 15:09 jcovert        Note Added: 0121502                          
======================================================================




More information about the asterisk-bugs mailing list