You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Senaka Fernando <se...@wso2.com> on 2008/02/16 18:11:50 UTC

[Request] Removing Warnings on Windows

Hi all,

I have removed all compiler warnings on Windows. However, we still have 5
left that can't be fixed unless we do a small fix.

The reason is that we insert function pointers into the hash. This can
cause unexpected problems as in [1]. The approach that we need to take is
quite simple. This is because only one type of function pointer is added
into the hash. They are the module handler create functions.

The solution is as follows.

1. We will define a new struct that will have just one member, which is a
function pointer.
2. We will create this struct and set the function pointer onto the struct.
3. We will simply add this wrapper struct into the hash, instead of the
function pointer, which will ensure type compatibility and get rid of the
warnings.

However, this fix will have to be applied on all existing modules that are
written for Axis2/C. And, this is a trivial fix, which will not cause any
problem to the operating logic of modules or the core. And, therefore I
believe that we could fix this issue for Axis2/C 1.3.0.

It also seems that the C99 specification does not guarantee that function
pointers and data pointers do have the same address size.

Thoughts??

[1] http://www.thescripts.com/forum/thread567535.html

Regards,
Senaka

>
>      [
> https://issues.apache.org/jira/browse/AXIS2C-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Senaka Fernando resolved AXIS2C-573.
> ------------------------------------
>
>     Resolution: Fixed
>
> This issue is now fixed. We still do have 5 warnings left. These are due
> to adding function pointers to the hash. But, this is a level 4 warning
> and therefore, for production purposes, as we are supposed to build with
> warning level 3, there aren't any warnings. I have disabled C4100, which
> arises as a result of our coding convention.
>
> Regards,
> Senaka
>
>> Fix warnings on windows
>> ------------------------
>>
>>                 Key: AXIS2C-573
>>                 URL: https://issues.apache.org/jira/browse/AXIS2C-573
>>             Project: Axis2-C
>>          Issue Type: Bug
>>          Components: build system (Windows)
>>         Environment: Windows
>>            Reporter: Nandika Jayawardana
>>            Assignee: Senaka Fernando
>>             Fix For: 1.3.0
>>
>>         Attachments: warnings.rtf, warnings.txt, warnings.xls,
>> warnings_2.rtf, warnings_2.txt, warnings_2.xls
>>
>>
>> When building axis2c source on windows, there are large number of
>> warnings. These warnings should be fixed
>
> --
> 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: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org