Changeset 52744f8


Ignore:
Timestamp:
2008-01-17T22:06:55Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ac4adf9
Parents:
13857c6
Message:

Fixing some Solaris compiler warnings (u_int->uint, adding some typecasts
for pid_t variables).

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.c

    r13857c6 r52744f8  
    279279                        child_list = g_slist_append( child_list, child );
    280280                       
    281                         log_message( LOGLVL_INFO, "Creating new subprocess with pid %d.", client_pid );
     281                        log_message( LOGLVL_INFO, "Creating new subprocess with pid %d.", (int) client_pid );
    282282                       
    283283                        /* Close some things we don't need in the parent process. */
  • ipc.c

    r13857c6 r52744f8  
    5252        if( g_strcasecmp( cmd[0], "CLIENT" ) == 0 )
    5353                ipc_to_children_str( "OPERMSG :Client connecting (PID=%d): %s@%s (%s)\r\n",
    54                                      child ? child->pid : -1, cmd[2], cmd[1], cmd[3] );
     54                                     (int) ( child ? child->pid : -1 ), cmd[2], cmd[1], cmd[3] );
    5555}
    5656
     
    446446       
    447447        for( l = child_list; l; l = l->next )
    448                 fprintf( fp, "%d %d\n", ((struct bitlbee_child*)l->data)->pid,
     448                fprintf( fp, "%d %d\n", (int) ((struct bitlbee_child*)l->data)->pid,
    449449                                        ((struct bitlbee_child*)l->data)->ipc_fd );
    450450       
     
    551551                child = g_new0( struct bitlbee_child, 1 );
    552552               
    553                 if( fscanf( fp, "%d %d", &child->pid, &child->ipc_fd ) != 2 )
     553                if( fscanf( fp, "%d %d", (int *) &child->pid, &child->ipc_fd ) != 2 )
    554554                {
    555555                        log_message( LOGLVL_WARNING, "Unexpected end of file: Only processed %d clients.", i );
  • lib/md5.c

    r13857c6 r52744f8  
    2626#include "md5.h"
    2727
    28 static void md5_transform(u_int32_t buf[4], u_int32_t const in[16]);
     28static void md5_transform(uint32_t buf[4], uint32_t const in[16]);
    2929
    3030/*
     
    5353                unsigned int len)
    5454{
    55         u_int32_t t;
     55        uint32_t t;
    5656
    5757        /* Update bitcount */
    5858
    5959        t = ctx->bits[0];
    60         if ((ctx->bits[0] = t + ((u_int32_t) len << 3)) < t)
     60        if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t)
    6161                ctx->bits[1]++; /* Carry from low to high */
    6262        ctx->bits[1] += len >> 29;
     
    7575                }
    7676                memcpy(p, buf, t);
    77                 md5_transform(ctx->buf, (u_int32_t *) ctx->in);
     77                md5_transform(ctx->buf, (uint32_t *) ctx->in);
    7878                buf += t;
    7979                len -= t;
     
    8383        while (len >= 64) {
    8484                memcpy(ctx->in, buf, 64);
    85                 md5_transform(ctx->buf, (u_int32_t *) ctx->in);
     85                md5_transform(ctx->buf, (uint32_t *) ctx->in);
    8686                buf += 64;
    8787                len -= 64;
     
    117117                /* Two lots of padding:  Pad the first block to 64 bytes */
    118118                memset(p, 0, count);
    119                 md5_transform(ctx->buf, (u_int32_t *) ctx->in);
     119                md5_transform(ctx->buf, (uint32_t *) ctx->in);
    120120
    121121                /* Now fill the next block with 56 bytes */
     
    127127
    128128        /* Append length in bits and transform */
    129         ((u_int32_t *) ctx->in)[14] = ctx->bits[0];
    130         ((u_int32_t *) ctx->in)[15] = ctx->bits[1];
    131 
    132         md5_transform(ctx->buf, (u_int32_t *) ctx->in);
     129        ((uint32_t *) ctx->in)[14] = ctx->bits[0];
     130        ((uint32_t *) ctx->in)[15] = ctx->bits[1];
     131
     132        md5_transform(ctx->buf, (uint32_t *) ctx->in);
    133133        memcpy(digest, ctx->buf, 16);
    134134        memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */
     
    152152 * the data and converts bytes into longwords for this routine.
    153153 */
    154 static void md5_transform(u_int32_t buf[4], u_int32_t const in[16])
    155 {
    156         register u_int32_t a, b, c, d;
     154static void md5_transform(uint32_t buf[4], uint32_t const in[16])
     155{
     156        register uint32_t a, b, c, d;
    157157
    158158        a = buf[0];
  • lib/md5.h

    r13857c6 r52744f8  
    2727#include <sys/types.h>
    2828#include <gmodule.h>
     29#include <stdint.h>
    2930
    30 typedef u_int8_t md5_byte_t;
     31typedef uint8_t md5_byte_t;
    3132typedef struct MD5Context {
    32         u_int32_t buf[4];
    33         u_int32_t bits[2];
     33        uint32_t buf[4];
     34        uint32_t bits[2];
    3435        unsigned char in[64];
    3536} md5_state_t;
  • protocols/nogaim.c

    r13857c6 r52744f8  
    625625}
    626626
    627 void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u_int32_t flags, time_t sent_at )
     627void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at )
    628628{
    629629        irc_t *irc = ic->irc;
     
    676676}
    677677
    678 void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags )
     678void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags )
    679679{
    680680        user_t *u;
     
    732732}
    733733
    734 void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at )
     734void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at )
    735735{
    736736        struct im_connection *ic = c->ic;
  • protocols/nogaim.h

    r13857c6 r52744f8  
    6868{
    6969        account_t *acc;
    70         u_int32_t flags;
     70        uint32_t flags;
    7171       
    7272        /* each connection then can have its own protocol-specific data */
     
    282282/* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle );
    283283/* Call when a handle says something. 'flags' and 'sent_at may be just 0. */
    284 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, u_int32_t flags, time_t sent_at );
    285 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags );
     284G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at );
     285G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags );
    286286G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle );
    287287
     
    299299G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason );
    300300/* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */
    301 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at );
     301G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at );
    302302/* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */
    303303G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at );
  • unix.c

    r13857c6 r52744f8  
    197197                {
    198198                        if( WIFSIGNALED( st ) )
    199                                 log_message( LOGLVL_INFO, "Client %d terminated normally. (status = %d)", pid, WEXITSTATUS( st ) );
     199                                log_message( LOGLVL_INFO, "Client %d terminated normally. (status = %d)", (int) pid, WEXITSTATUS( st ) );
    200200                        else if( WIFEXITED( st ) )
    201                                 log_message( LOGLVL_INFO, "Client %d killed by signal %d.", pid, WTERMSIG( st ) );
     201                                log_message( LOGLVL_INFO, "Client %d killed by signal %d.", (int) pid, WTERMSIG( st ) );
    202202                }
    203203        }
Note: See TracChangeset for help on using the changeset viewer.