Changeset 3788:fe1762804632 in roaraudio


Ignore:
Timestamp:
05/07/10 15:44:52 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fix some warnings

Location:
libroar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libroar/slp.c

    r3517 r3788  
    3636#include "libroar.h" 
    3737 
     38#if defined(ROAR_HAVE_LIBSLP) && defined(ROAR_HAVE_TIME) 
     39#define _CAN_OPERATE 
     40#endif 
     41 
    3842SLPBoolean roar_slp_url_callback(SLPHandle        hslp, 
    3943                                 const char     * srvurl, 
     
    4145                                 SLPError         errcode, 
    4246                                 void           * cookie) { 
    43 #ifdef ROAR_HAVE_LIBSLP 
     47#ifdef _CAN_OPERATE 
    4448 struct roar_slp_cookie * self = cookie; 
    4549 
     
    7882 
    7983int roar_slp_search          (struct roar_slp_cookie * cookie, char * type) { 
    80 #ifdef ROAR_HAVE_LIBSLP 
     84#ifdef _CAN_OPERATE 
    8185 SLPError err; 
    8286 SLPHandle hslp; 
     
    151155 
    152156int    roar_slp_find_roard_r (char * addr, size_t len, int nocache) { 
     157#ifdef _CAN_OPERATE 
    153158 static struct roar_slp_match    cache  = {"", 0}; 
    154159        struct roar_slp_cookie   cookie; 
     
    207212 
    208213 return 0; 
     214#else 
     215 return -1; 
     216#endif 
    209217} 
    210218 
  • libroar/socket.c

    r3785 r3788  
    5959 int opt = IPTOS_LOWDELAY; 
    6060#endif 
    61 #ifdef TCP_NODELAY 
     61#if defined(TCP_NODELAY) && !defined(ROAR_TARGET_WIN32) 
    6262 int t   = 1; 
    6363#endif 
     
    7070 setsockopt(fh, IPPROTO_IP, IP_TOS, &opt, sizeof(int)); 
    7171#endif 
    72 #ifdef TCP_NODELAY 
     72#if defined(TCP_NODELAY) && !defined(ROAR_TARGET_WIN32) 
    7373 setsockopt(fh, IPPROTO_TCP, TCP_NODELAY, &t, sizeof(int)); 
    7474#endif 
     
    476476#ifdef ROAR_HAVE_IPX 
    477477#define _NEED_OBJ 
    478  int i; 
    479478 int ret; 
     479#endif 
     480#ifdef ROAR_HAVE_IPX 
     481 unsigned int ipx_port; 
    480482#endif 
    481483#ifdef ROAR_HAVE_UNIX 
     
    503505#endif 
    504506 //unsigned int host_div = 0; 
     507#ifdef ROAR_TARGET_WIN32 
     508 int PASCAL (*mode_func)(SOCKET,const struct sockaddr*,int) = connect; // default is to connect 
     509#else 
    505510 int (*mode_func)(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) = connect; // default is to connect 
     511#endif 
    506512#ifdef ROAR_HAVE_LIBDNET 
    507513#define _NEED_OBJ 
     
    649655  obj[0] = 0; 
    650656 
    651   if ( (ret = sscanf(host, "%8x.%12s(%x)", &socket_addr.ipx.sipx_network, obj, 
    652                                (unsigned int *)&socket_addr.ipx.sipx_port)) < 2 ) { 
    653    return -1; 
     657  if ( (ret = sscanf(host, "%8x.%12s(%x)", &socket_addr.ipx.sipx_network, obj, &ipx_port)) < 2 ) { 
     658   return -1; 
     659   socket_addr.ipx.sipx_port = ipx_port; 
    654660  } else if ( ret == 2 ) { 
    655661   socket_addr.ipx.sipx_port = port; // Network Byte Order? 
  • libroar/vio_proto.c

    r3764 r3788  
    260260 struct roar_vio_proto * self; 
    261261 struct roar_buffer * bufbuf; 
     262 void * vpbuf; 
    262263 char * buf; 
    263264 char * endofheader = NULL; 
     
    274275 calls->write = NULL; // Disable write as we do not support this 
    275276 
    276  if ( roar_buffer_new_data(&bufbuf, 1024, &buf) == -1 ) 
    277   return -1; 
     277 if ( roar_buffer_new_data(&bufbuf, 1024, &vpbuf) == -1 ) 
     278  return -1; 
     279 
     280 buf = vpbuf; 
    278281 
    279282 ROAR_DBG("roar_vio_open_proto_http(calls=%p, dst=%p, host='%s', file='%s') = ?", calls, dst, host, file); 
  • libroar/vio_tantalos.c

    r3517 r3788  
    3838#define _LEN 1024 
    3939 
     40#ifdef ROAR_HAVE_LIBSLP 
    4041static struct roar_slp_cookie * roar_vio_open_get_cookie (int reinit) { 
    4142 static struct roar_slp_cookie   cookie; 
     
    5051 return &cookie; 
    5152} 
     53#endif 
    5254 
    5355int     roar_vio_open_tantalos    (struct roar_vio_calls * calls, struct roar_vio_calls * dst, 
Note: See TracChangeset for help on using the changeset viewer.