Changeset 3494

Show
Ignore:
Timestamp:
01/11/06 16:34:33 (3 years ago)
Author:
morris
Message:

Kill some warnings on MacOSX10.3.9

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/net/wi-socket.c

    r3463 r3494  
    974974#endif 
    975975        struct sockaddr_storage         ss; 
    976         unsigned int                           size
     976        socklen_t                                      length
    977977        int                                                     sd; 
    978978         
    979         size = sizeof(ss); 
    980         sd = accept(accept_socket->sd, (struct sockaddr *) &ss, &size); 
    981         *address = wi_address_init_with_sa(wi_address_alloc(), (struct sockaddr *) &ss); 
     979        length = sizeof(ss); 
     980        sd = accept(accept_socket->sd, (struct sockaddr *) &ss, &length); 
     981         
     982        *address = (length > 0) ? wi_address_init_with_sa(wi_address_alloc(), (struct sockaddr *) &ss) : NULL; 
    982983 
    983984        if(sd < 0) { 
     
    11561157        struct sockaddr_storage         ss; 
    11571158        char                                            *inbuffer = NULL; 
    1158         unsigned int                           size
     1159        socklen_t                                      sslength
    11591160        int                                                     bytes; 
     1161         
     1162        sslength = sizeof(ss); 
    11601163         
    11611164#ifdef WI_SSL 
    11621165        if(context->priv_rsa) { 
    11631166                inbuffer = wi_malloc(length); 
    1164                 bytes = recvfrom(socket->sd, inbuffer, length, 0, (struct sockaddr *) &ss, &size); 
     1167                bytes = recvfrom(socket->sd, inbuffer, length, 0, (struct sockaddr *) &ss, &sslength); 
    11651168                 
    11661169                if(bytes < 0) { 
     
    11801183        } else { 
    11811184#endif 
    1182                 bytes = recvfrom(socket->sd, buffer, length, 0, (struct sockaddr *) &ss, &size); 
     1185                bytes = recvfrom(socket->sd, buffer, length, 0, (struct sockaddr *) &ss, &sslength); 
    11831186 
    11841187                if(bytes < 0) { 
     
    11921195 
    11931196end: 
    1194         *address = wi_address_init_with_sa(wi_address_alloc(), (struct sockaddr *) &ss)
     1197        *address = (sslength > 0) ? wi_address_init_with_sa(wi_address_alloc(), (struct sockaddr *) &ss) : NULL
    11951198 
    11961199        if(inbuffer) 
  • libwired/trunk/libwired/net/wi-wired.c

    r3342 r3494  
    7878                 
    7979                if(wi_string_length(substring) == 0) 
    80                         *out_arguments = wi_array_init_with_data(wi_array_alloc(), WI_STR(""), NULL); 
     80                        *out_arguments = wi_array_init_with_data(wi_array_alloc(), WI_STR(""), (void *) NULL); 
    8181                else 
    8282                        *out_arguments = wi_array_init_with_string(wi_array_alloc(), substring, WI_STR(_WI_WIRED_FIELD_SEPARATOR));