Fix warnings from ICC

darcs-hash:20060329001450-ac50b-9c3fe4f7ca14a077997c421616c07dde03b48c6d.gz
This commit is contained in:
axel 2006-03-29 10:14:50 +10:00
parent 749dad1309
commit 13a51ba4c2
5 changed files with 9 additions and 9 deletions

View file

@ -3231,7 +3231,7 @@ static int internal_help( wchar_t *cmd )
int builtin_run( wchar_t **argv ) int builtin_run( wchar_t **argv )
{ {
int (*cmd)(wchar_t **argv)=0; int (*cmd)(wchar_t **argv)=0;
cmd = hash_get( &builtin, argv[0] ); cmd = (int (*)(wchar_t **))hash_get( &builtin, argv[0] );
if( argv[1] != 0 && !internal_help(argv[0]) ) if( argv[1] != 0 && !internal_help(argv[0]) )
{ {

View file

@ -3,6 +3,8 @@
Functions used for implementing the ulimit builtin. Functions used for implementing the ulimit builtin.
*/ */
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <wchar.h> #include <wchar.h>
@ -12,8 +14,6 @@ Functions used for implementing the ulimit builtin.
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include "config.h"
#include "fallback.h" #include "fallback.h"
#include "util.h" #include "util.h"

View file

@ -41,7 +41,7 @@ typedef struct halloc
static halloc_t *halloc_from_data( void *data ) static halloc_t *halloc_from_data( void *data )
{ {
return (halloc_t *)(data - sizeof( halloc_t ) ); return (halloc_t *)(((char *)data) - sizeof( halloc_t ) );
} }
static void late_free( void *data) static void late_free( void *data)
@ -83,7 +83,7 @@ void *halloc( void *context, size_t size )
{ {
res = parent->scratch; res = parent->scratch;
parent->scratch_free -= size; parent->scratch_free -= size;
parent->scratch += size; parent->scratch = ((char *)parent->scratch)+size;
} }
else else
{ {
@ -98,7 +98,7 @@ void *halloc( void *context, size_t size )
alloc_spill += parent->scratch_free; alloc_spill += parent->scratch_free;
#endif #endif
res = calloc( 1, size + HALLOC_BLOCK_SIZE ); res = calloc( 1, size + HALLOC_BLOCK_SIZE );
parent->scratch = res + size; parent->scratch = (char *)res + size;
parent->scratch_free = HALLOC_BLOCK_SIZE; parent->scratch_free = HALLOC_BLOCK_SIZE;
} }
else else
@ -121,7 +121,7 @@ void *halloc( void *context, size_t size )
#ifdef HALLOC_DEBUG #ifdef HALLOC_DEBUG
parent_count++; parent_count++;
#endif #endif
me->scratch = ((void *)me) + sizeof(halloc_t) + size; me->scratch = ((char *)me) + sizeof(halloc_t) + size;
me->scratch_free = HALLOC_BLOCK_SIZE; me->scratch_free = HALLOC_BLOCK_SIZE;
al_init( &me->children ); al_init( &me->children );

View file

@ -291,7 +291,7 @@ static void history_save()
history_count=0; history_count=0;
past_end=1; past_end=1;
history_load( mode_name ); history_load();
if( real_pos != 0 ) if( real_pos != 0 )
{ {
/* /*

View file

@ -605,7 +605,7 @@ int wildcard_expand( const wchar_t *wc,
/* /*
The maximum length of a file element The maximum length of a file element
*/ */
size_t ln=MAX_FILE_LENGTH; long ln=MAX_FILE_LENGTH;
char * narrow_dir_string = wcs2str( dir_string ); char * narrow_dir_string = wcs2str( dir_string );
if( narrow_dir_string ) if( narrow_dir_string )