[ 
https://issues.apache.org/jira/browse/AXIS2C-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601881#action_12601881
 ] 

Steve Nairn commented on AXIS2C-1157:
-------------------------------------

What is the point in removing the "static" qualifier? Surely it would make more 
sense to just remove the function.

The function is not used in hash.c and has never been used since it was renamed 
from axis2_hash_entry_free in r524225. The function has never been used outside 
hash.c since (up until now) it has been static so has not been visible outside 
that file.

By removing the "static" qualifier the function is now visible outside hash.c 
so could be called on some architectures. By default Linux exports all global 
symbols from shared libraries so (in theory) it the function could be called on 
Linux. However, it won't be exported from the DLL on Windows as it's not marked 
AXIS2_EXTERN, so the Linux and Windows interfaces will be different.

Also, it's hard to see why anyone would want to call the function outside 
hash.c. The second parameter is a pointer to a axutil_hash_entry_t struct that 
is private to hash.c. The definition is not visible outside hash.c, so a 
potential caller couldn't call it with parameters of the correct type even if 
they wanted to.

It's dead code. Why not just remove the function?

Cheers,
Steve

> When -Werror is in effect build break in util/src
> -------------------------------------------------
>
>                 Key: AXIS2C-1157
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1157
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.4.0
>         Environment: Fedora Core 9. GCC 4.3.0
>            Reporter: Chintana Wilamuna
>             Fix For: Current (Nightly)
>
>
> GCC complains with the following error,
> hash.c:573: error: 'axutil_hash_entry_free' defined but not used
> make[5]: *** [hash.lo] Error 1
> Since WSF/C uses all the modules I issued the following command to see where 
> axutil_hash_entry_free is being used,
> find wsf_c -iname '*.c' | xargs grep 'axutil_hash_entry_free'
> And found out that it's not being used anywhere.  If it's not being used I 
> suggest at least commenting out the function since it breaks the build.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to