Be careful:

I understand Henri problem report as getsockopt complaining about the *last* argument. So it has been introduced between 1.2.15 and 1.2.16:

------------------------------------------------------------------------
r386629 | pero | 2006-03-17 13:36:04 +0100 (Fri, 17 Mar 2006) | 1 line

Fix gcc 4.0.1 compiler warning at mac os x!
------------------------------------------------------------------------

svn diff -r 386628:386629 jk_connect.c
Index: jk_connect.c
===================================================================
--- jk_connect.c        (revision 386628)
+++ jk_connect.c        (revision 386629)
@@ -177,7 +177,7 @@
                    && (timeout > 0)) {
         fd_set wfdset;
         struct timeval tv;
-        int rclen = sizeof(rc);
+        unsigned int rclen = sizeof(rc);

         FD_ZERO(&wfdset);
         FD_SET(sock, &wfdset);

Since it actually build OK for Linux 32 and 64Bit I would also like to go forward with 1.2.17. Is it possible to make this error a warning on iSeries and fix for 1.2.18?

We set rclen only in the line

        unsigned int rclen = sizeof(rc);

and rc itself is an int, there is no way, how rclen could behave differently as an argument (sign extensions). Furthermore we never read from rclen after passing &rclen to getsockopt(), so it really should be save using either of both ways (unsigned int and int).

Rainer

Mladen Turk wrote:
Henri Gomez wrote:

jk 1.2.17 build failed on iSeries v5R3.

/home/apache/jk/native/common/jk_connect.c, 198.38: CZM0280(30) Function
 argument assignment between types "int*" and "unsigned int*" is not
 allowed.


Henri, can you commit the working version?
Seems that the 'unsigned int' is present for ages,
and unless there is actual reason that would break
the functionality if you force your compiler to
treat this as warning instead as error,
we should go with 1.2.17.

OTOH, the same might apply to SOCKET<->int types
for windows, where we simply disregard the warnings
although I don't know how that behaves on win64, cause
SOCKET is defined as 'unsigned int *' (UINT_PTR)

Perhaps we could fix that socklen_t and add jk_sock_t
type all at once if you guys think this bug breaks
the 1.2.17.

Regards,
Mladen.

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

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

Reply via email to