[asterisk-bugs] [JIRA] Issue Comment Edited: (PRI-143) Fix "no return statement in function returning non-void" compile error.

Shaun Ruffell (JIRA) noreply at issues.asterisk.org
Sat Sep 8 15:05:07 CDT 2012


    [ https://issues.asterisk.org/jira/browse/PRI-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196791#comment-196791 ] 

Shaun Ruffell edited comment on PRI-143 at 9/8/12 3:03 PM:
-----------------------------------------------------------

A note on how to use git to apply this patch quickly to the 1.4 branch of libpri. If you have git and subversion installed on your workstation, you can cut and paste the following commands into a console window which will do all the work of getting the patch in a local repo ready to commit and it will pop open a window to allow you to edit the commit message or add any additional information. *It will not commit to subversion*.

{code}
git svn clone -r HEAD https://origsvn.digium.com/svn/libpri/branches/1.4 libpri-to-commit
cd libpri-to-commit/
git svn rebase
wget "https://issues.asterisk.org/jira/secure/attachment/44535/0001-Fix-no-return-statement-in-function-returning-non-vo.patch" -O - | git am
git commit --amend

{code}

Once you are done editing the commit message, you can make it official and commit to subversion with:

{code}
git svn dcommit

{code}

      was (Author: sruffell):
    A note on how to use git to apply this patch quickly to the 1.4 branch of libpri. If you have git and subversion installed on your workstation, you can cut and paste the following commands into a console window which will do all the work of getting the patch in a local repo ready to commit and it will pop open a window to allow you to edit the commit message or add any additional information. *It will not commit to subversion*.

{code}
git svn clone -r HEAD http://svn.asterisk.org/svn/libpri/branches/1.4 libpri-to-commit
cd libpri-to-commit/
git svn rebase
wget "https://issues.asterisk.org/jira/secure/attachment/44535/0001-Fix-no-return-statement-in-function-returning-non-vo.patch" -O - | git am
git commit --amend

{code}

Once you are done editing the commit message, you can make it official and commit to subversion with:

{code}
git svn dcommit

{code}

  
> Fix "no return statement in function returning non-void" compile error.
> -----------------------------------------------------------------------
>
>                 Key: PRI-143
>                 URL: https://issues.asterisk.org/jira/browse/PRI-143
>             Project: LibPRI
>          Issue Type: Bug
>          Components: General
>         Environment: Ubuntu 12.04.1 LTS, gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 
>            Reporter: Shaun Ruffell
>            Assignee: Richard Mudgett
>            Severity: Blocker
>         Attachments: 0001-Fix-no-return-statement-in-function-returning-non-vo.patch
>
>
> This appears to be an old condition that is caught by newer compilers.
> {noformat}
>     With gcc 4.6.3 it's possible to get the following error:                                                                                
>                                                                                                                                             
>       $ make                                                                                                                                
>       gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC  -O2  -MD -MT pridump.o -MF .pridump.o.d -MP -c -o pridump.o prid~
>       pridump.c: In function 'pri_bridge':                                                                                                  
>       pridump.c:117:1: error: no return statement in function returning non-void [-Werror=return-type]                                      
>       cc1: all warnings being treated as errors                                                                                             
>       make: *** [pridump.o] Error 1                                                                                                         
>                                                                                                                                             
>     Changing the function return value to void fixes the issue since there were no                                                          
>     places in the code that used the return value.                                                                                          
>                                                                                                                                             
>     Reported by: Birger "WIMPy" Harzenetter
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list