Changeset 1545


Ignore:
Timestamp:
Mar 8, 2007, 4:53:50 AM (15 years ago)
Author:
joshe
Message:

Fix for if unused isn't defined.
Pointless churn to silence char*/unint8_t* warnings.

Location:
branches/pex/libtransmission
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/pex/libtransmission/bencode.c

    r1540 r1545  
    283283}
    284284
    285 void tr_bencInitStr( benc_val_t * val, char * str, int len, int nofree )
     285void _tr_bencInitStr( benc_val_t * val, char * str, int len, int nofree )
    286286{
    287287    tr_bencInit( val, TYPE_STR );
     
    308308    }
    309309
    310     tr_bencInitStr( val, new, 0, 0 );
     310    _tr_bencInitStr( val, new, 0, 0 );
    311311
    312312    return 0;
  • branches/pex/libtransmission/bencode.h

    r1540 r1545  
    7272}
    7373
    74 void   tr_bencInitStr( benc_val_t * val, char * str, int len, int nofree );
     74#define tr_bencInitStr( a, b, c, d ) \
     75    _tr_bencInitStr( (a), ( char * )(b), (c), (d) )
     76void   _tr_bencInitStr( benc_val_t * val, char * str, int len, int nofree );
    7577int    tr_bencInitStrDup( benc_val_t * val, const char * str );
    7678void   tr_bencInitInt( benc_val_t * val, int64_t num );
  • branches/pex/libtransmission/bsdtree.h

    r1540 r1545  
    2929#ifndef _SYS_TREE_H_
    3030#define _SYS_TREE_H_
     31
     32#ifndef __unused
     33#define __unused
     34#endif
    3135
    3236/*
  • branches/pex/libtransmission/internal.h

    r1540 r1545  
    100100   char pointers */
    101101#define TR_NTOHL(p,a) (a) = tr_ntohl((p))
    102 #define TR_HTONL(a,p) tr_htonl((a), (p))
     102#define TR_HTONL(a,p) tr_htonl((a), ( uint8_t * )(p))
    103103static inline uint32_t tr_ntohl( uint8_t * p )
    104104{
  • branches/pex/libtransmission/peeraz.h

    r1542 r1545  
    8181
    8282static inline int
    83 azmsgNameIndex( const char *name, int len )
     83azmsgNameIndex( const char * name, int len )
    8484{
    8585    int ii;
     
    9797}
    9898
    99 static char *
     99static uint8_t *
    100100makeAZHandshake( tr_torrent_t * tor, tr_peer_t * peer, int * buflen )
    101101{
     
    195195
    196196    *buflen = len;
    197     return buf;
     197    return ( uint8_t * )buf;
    198198}
    199199
     
    245245sendAZHandshake( tr_torrent_t * tor, tr_peer_t * peer )
    246246{
    247     char * buf;
     247    uint8_t * buf;
    248248    int len;
    249249
     
    319319    msglen -= off;
    320320
    321     index = azmsgNameIndex( name, namelen );
     321    index = azmsgNameIndex( ( char * )name, namelen );
    322322    if( AZ_EXT_VERSION != vers )
    323323    {
     
    479479        if( TYPE_STR == pair->type && 6 == pair->val.s.i )
    480480        {
    481             tr_torrentAddCompact( tor, TR_PEER_FROM_PEX, pair->val.s.s, 1 );
     481            tr_torrentAddCompact( tor, TR_PEER_FROM_PEX,
     482                                  ( uint8_t * )pair->val.s.s, 1 );
    482483        }
    483484    }
  • branches/pex/libtransmission/peerext.h

    r1542 r1545  
    279279    {
    280280        tr_torrentAddCompact( tor, TR_PEER_FROM_PEX,
    281                               sub->val.s.s, sub->val.s.i / 6 );
     281                              ( uint8_t * )sub->val.s.s, sub->val.s.i / 6 );
    282282    }
    283283
Note: See TracChangeset for help on using the changeset viewer.