[asterisk-bugs] [JIRA] Updated: (PRI-143) Fix "no return statement in function returning non-void" compile error.
Shaun Ruffell (JIRA)
noreply at issues.asterisk.org
Fri Sep 7 23:41:07 CDT 2012
[ https://issues.asterisk.org/jira/browse/PRI-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shaun Ruffell updated PRI-143:
------------------------------
Attachment: 0001-Fix-no-return-statement-in-function-returning-non-vo.patch
Attached 0001-Fix-no-return-statement-in-function-returning-non-vo.patch which is a trivial fix.
> 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