Changeset 25c4c78


Ignore:
Timestamp:
2015-01-16T19:50:24Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
a6cd799
Parents:
7549d00
git-author:
Jason Copenhaver <jcopenha@…> (16-01-15 19:50:24)
git-committer:
dequis <dx@…> (16-01-15 19:50:24)
Message:

Fix compiler warnings on Cygwin and Mac OS X.

  • Don't use PIE/PIC on Cygwin/Darwin unless specified as these platforms don't support it.
  • Cleanup warnings for 'make check' build.
  • Fix the type issue for getsockopt calls.
  • Fix enum warnings in Yahoo libs on Mac OS X.
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • configure

    r7549d00 r25c4c78  
    5656
    5757echo BitlBee configure
     58
     59# Cygwin and Darwin don't support PIC/PIE
     60case "$arch" in
     61    CYGWIN* )
     62        pie=0;;
     63    Darwin )
     64        pie=0;;
     65esac
    5866
    5967while [ -n "$1" ]; do
  • ipc.c

    r7549d00 r25c4c78  
    524524                {
    525525                        /* There is no typo in this line: */
    526                         for( j = 1; cmd[j]; j ++ ); j --;
     526                        for( j = 1; cmd[j]; j ++ )
     527                                ;
     528                        j--;
    527529                       
    528530                        if( j < commands[i].required_parameters )
  • irc_commands.c

    r7549d00 r25c4c78  
    770770                {
    771771                        /* There should be no typo in the next line: */
    772                         for( n_arg = 0; cmd[n_arg]; n_arg ++ ); n_arg --;
     772                        for( n_arg = 0; cmd[n_arg]; n_arg ++ )
     773                                ;
     774                        n_arg--;
    773775                       
    774776                        if( irc_commands[i].flags & IRC_CMD_PRE_LOGIN && irc->status & USTATUS_LOGGED_IN )
  • lib/ns_parse.c

    r7549d00 r25c4c78  
    1919
    2020#ifndef lint
    21 static const char rcsid[] = "$Id: ns_parse.c,v 1.10 2009/01/23 19:59:16 each Exp $";
     21//static const char rcsid[] = "$Id: ns_parse.c,v 1.10 2009/01/23 19:59:16 each Exp $";
    2222#endif
    2323
  • lib/proxy.c

    r7549d00 r25c4c78  
    6666{
    6767        struct PHB *phb = data;
    68         unsigned int len;
     68        socklen_t len;
    6969        int error = ETIMEDOUT;
    7070        len = sizeof(error);
     
    214214        char cmd[384];
    215215        struct PHB *phb = data;
    216         unsigned int len;
     216        socklen_t len;
    217217        int error = ETIMEDOUT;
    218218        if (phb->inpa > 0)
     
    309309        struct hostent *hp;
    310310        struct PHB *phb = data;
    311         unsigned int len;
     311        socklen_t len;
    312312        int error = ETIMEDOUT;
    313313        if (phb->inpa > 0)
     
    501501        int i;
    502502        struct PHB *phb = data;
    503         unsigned int len;
     503        socklen_t len;
    504504        int error = ETIMEDOUT;
    505505        if (phb->inpa > 0)
  • protocols/oscar/conn.c

    r7549d00 r25c4c78  
    571571
    572572        if (FD_ISSET(conn->fd, &fds) || FD_ISSET(conn->fd, &wfds)) {
    573                 unsigned int len = sizeof(error);
     573                socklen_t len = sizeof(error);
    574574
    575575                if (getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0)
  • protocols/yahoo/libyahoo2.c

    r7549d00 r25c4c78  
    974974                        msg = pair->value;
    975975
    976                 if (pair->key == 13) ;
     976                if (pair->key == 13)
     977                        ;
    977978                if (pair->key == 16)    /* error */
    978979                        msg = pair->value;
     
    17951796        switch (code)
    17961797        {
    1797                 case 1212: return YAHOO_LOGIN_PASSWD;
    1798                 case 1213: return YAHOO_LOGIN_LOCK;
    1799                 case 1235: return YAHOO_LOGIN_UNAME;
     1798                case 1212: return (enum yahoo_status) YAHOO_LOGIN_PASSWD;
     1799                case 1213: return (enum yahoo_status) YAHOO_LOGIN_LOCK;
     1800                case 1235: return (enum yahoo_status) YAHOO_LOGIN_UNAME;
    18001801                default: return (enum yahoo_status) code;
    18011802        }
     
    36103611        yd = yid->yd;
    36113612
    3612         pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE,
     3613        pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, (enum ypacket_status) YAHOO_STATUS_OFFLINE,
    36133614                yd->session_id);
    36143615
     
    36773678        if (yd->current_status == YAHOO_STATUS_INVISIBLE) {
    36783679                pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_VISIBLE_TOGGLE,
    3679                         YAHOO_STATUS_AVAILABLE, 0);
     3680                        (enum ypacket_status) YAHOO_STATUS_AVAILABLE, 0);
    36803681                yahoo_packet_hash(pkt, 13, "2");
    36813682                yahoo_send_packet(yid, pkt, 0);
     
    36963697        if (old_status == YAHOO_STATUS_INVISIBLE) {
    36973698                pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_VISIBLE_TOGGLE,
    3698                         YAHOO_STATUS_AVAILABLE, 0);
     3699                        (enum ypacket_status) YAHOO_STATUS_AVAILABLE, 0);
    36993700                yahoo_packet_hash(pkt, 13, "1");
    37003701                yahoo_send_packet(yid, pkt, 0);
  • protocols/yahoo/yahoo_util.h

    r7549d00 r25c4c78  
    4848
    4949# define snprintf       g_snprintf
     50#ifdef vsnprintf
     51#undef vsnprintf
     52#endif
    5053# define vsnprintf      g_vsnprintf
    5154
  • tests/check_arc.c

    r7549d00 r25c4c78  
    8888                                  &decrypted, password );
    8989               
     90                fail_if( len == -1,
     91                 "`%s' didn't decrypt properly", decrypt_tests[i].decrypted );
    9092                fail_if( strcmp( decrypt_tests[i].decrypted, decrypted ) != 0,
    9193                         "`%s' didn't decrypt properly", decrypt_tests[i].decrypted );
  • tests/check_irc.c

    r7549d00 r25c4c78  
    2828        GIOChannel *ch1, *ch2;
    2929        irc_t *irc;
    30         GError *error = NULL;
    3130        char *raw;
    3231        fail_unless(g_io_channel_pair(&ch1, &ch2));
  • tests/check_jabber_sasl.c

    r7549d00 r25c4c78  
    8787                tcase_fn_start( get_part_tests[i].key, __FILE__, i );
    8888                char *res;
    89                 int len;
    9089               
    9190                res = sasl_get_part( get_part_tests[i].challenge,
Note: See TracChangeset for help on using the changeset viewer.