axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Nairn (JIRA)" <>
Subject [jira] Commented: (AXIS2C-1157) When -Werror is in effect build break in util/src
Date Tue, 03 Jun 2008 10:02:45 GMT


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?


> When -Werror is in effect build break in util/src
> -------------------------------------------------
>                 Key: AXIS2C-1157
>                 URL:
>             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:
For additional commands, e-mail:

View raw message