Changeset 56f260a


Ignore:
Timestamp:
2007-11-22T22:56:52Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
df6d1da
Parents:
d75597b
Message:

Some changes to get rid of compiler warnings. (And disabling strict
aliasing because there are too many warnings about it. :-P)

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • configure

    rd75597b r56f260a  
    137137        echo '#define DEBUG' >> config.h
    138138else
    139         [ -z "$CFLAGS" ] && CFLAGS=-O3
     139        [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing"
    140140fi
    141141
  • lib/ssl_gnutls.c

    rd75597b r56f260a  
    3535
    3636static gboolean initialized = FALSE;
     37
     38#include <limits.h>
     39
     40#if defined(ULONG_MAX) && ULONG_MAX > 4294967295UL
     41#define GNUTLS_STUPID_CAST (long)
     42#else
     43#define GNUTLS_STUPID_CAST (int)
     44#endif
    3745
    3846struct scd
     
    125133       
    126134        sock_make_nonblocking( conn->fd );
    127         gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr) conn->fd );
     135        gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr) GNUTLS_STUPID_CAST conn->fd );
    128136       
    129137        return ssl_handshake( data, source, cond );
  • protocols/nogaim.c

    rd75597b r56f260a  
    699699       
    700700        if( set_getbool( &ic->irc->set, "debug" ) )
    701                 imcb_log( ic, "You were removed from conversation 0x%x", (int) c );
     701                imcb_log( ic, "You were removed from conversation %p", c );
    702702       
    703703        if( c )
     
    755755        else
    756756        {
    757                 imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, wrapped );
     757                imcb_log( ic, "Message from/to conversation %s@%p (unknown conv/user): %s", who, c, wrapped );
    758758        }
    759759        g_free( wrapped );
     
    803803       
    804804        if( set_getbool( &ic->irc->set, "debug" ) )
    805                 imcb_log( ic, "Creating new conversation: (id=0x%x,handle=%s)", (int) c, handle );
     805                imcb_log( ic, "Creating new conversation: (id=%p,handle=%s)", c, handle );
    806806       
    807807        return c;
     
    817817       
    818818        if( set_getbool( &b->ic->irc->set, "debug" ) )
    819                 imcb_log( b->ic, "User %s added to conversation 0x%x", handle, (int) b );
     819                imcb_log( b->ic, "User %s added to conversation %p", handle, b );
    820820       
    821821        /* It might be yourself! */
     
    852852       
    853853        if( set_getbool( &b->ic->irc->set, "debug" ) )
    854                 imcb_log( b->ic, "User %s removed from conversation 0x%x (%s)", handle, (int) b, reason ? reason : "" );
     854                imcb_log( b->ic, "User %s removed from conversation %p (%s)", handle, b, reason ? reason : "" );
    855855       
    856856        /* It might be yourself! */
  • root_commands.c

    rd75597b r56f260a  
    745745static void cmd_set( irc_t *irc, char **cmd )
    746746{
    747         char *set_name;
     747        char *set_name = NULL;
    748748       
    749749        if( cmd[1] && cmd[2] )
     
    765765                }
    766766        }
    767         if( cmd[1] ) /* else 'forgotten' on purpose.. Must show new value after changing */
     767        if( set_name ) /* else 'forgotten' on purpose.. Must show new value after changing */
    768768        {
    769769                char *s = set_getstr( &irc->set, set_name );
  • storage_xml.c

    rd75597b r56f260a  
    456456                   return TRUE on write errors. Which means, if we found
    457457                   something, there was an error. :-) */
    458                 if( g_hash_table_find( acc->nicks, xml_save_nick, (gpointer) fd ) )
     458                if( g_hash_table_find( acc->nicks, xml_save_nick, & fd ) )
    459459                        goto write_error;
    460460               
     
    494494static gboolean xml_save_nick( gpointer key, gpointer value, gpointer data )
    495495{
    496         return !xml_printf( (int) data, 2, "<buddy handle=\"%s\" nick=\"%s\" />\n", key, value );
     496        return !xml_printf( *( (int*) data ), 2, "<buddy handle=\"%s\" nick=\"%s\" />\n", key, value );
    497497}
    498498
Note: See TracChangeset for help on using the changeset viewer.