plug-ins: fix signedness warning with different expectation Win/Linux.
On Windows, accept() wants an int for addrlen but on Linux, it wants a socklen_t which is an unsigned int. So we can't just switch to gint as proposed in !232 (if we do so, the signedness warning now happens on the Linux build instead of the Windows one). Fortunately it looks like socklen_t is actually typedef-ed to int in Windows headers. So let's just use this type, which is much more proper anyway as this variable is only used in functions which want this type on Linux. Fixes: > warning: pointer targets in passing argument 3 of 'accept' differ in signedness
This commit is contained in:
@ -350,7 +350,7 @@ script_fu_server_listen (gint timeout)
|
|||||||
gchar clientname[NI_MAXHOST];
|
gchar clientname[NI_MAXHOST];
|
||||||
|
|
||||||
/* Connection request on original socket. */
|
/* Connection request on original socket. */
|
||||||
guint size = sizeof (client);
|
socklen_t size = sizeof (client);
|
||||||
gint new;
|
gint new;
|
||||||
guint portno;
|
guint portno;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user