[ 
https://issues.apache.org/jira/browse/AXIS2C-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Danny Sung updated AXIS2C-1337:
-------------------------------

    Attachment: axis2c-warn_unused.patch

I see the same problem on Fedora Core 6, gcc version 4.1.2.  Here's a patch 
that at least gets it through compiling.  I've only made it return failures 
from the respective functions (with a print to stderr).  No attempt was made to 
correct any failure conditions.

Also the return value was only checked against Linux's man pages.  I have no 
idea if this would be correct for Windows.


> Fails to compile if chdir and/or fread declared with warn_unused_result
> -----------------------------------------------------------------------
>
>                 Key: AXIS2C-1337
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1337
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: tcpmon, util
>    Affects Versions: 1.5.0
>         Environment: Ubuntu 9.04 (pre-release)
>            Reporter: Soren Hansen
>         Attachments: axis2c-warn_unused.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> axis2c fails to compile on Ubuntu 9.04, due to two things:
> In util/src/dir_handler.c, AXIS2_CHDIR's return value is ignored. chdir is 
> declared with warn_unused_result in our toolchain, and you pass -Werror to 
> gcc, so this causes a build failure. Obvisouly, chdir could fail for a number 
> of reasons, and failing to check is a problem.
> The same problem exists in tools/tcpmon/src/tcpmon.c, where the return value 
> of fread is ignored.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to