Changeset a9fc180


Ignore:
Timestamp:
Jan 31, 2017, 11:25:10 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
064cb18, 41a7137, dd0b961
Parents:
a91dcc2
Message:

Tentative fix for 32-bit error with malloc changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib.c

    ra91dcc2 ra9fc180  
    2929forall( dtype T | sized(T) ) T * malloc( void ) {
    3030        //printf( "malloc1\n" );
    31     return (T *)malloc( sizeof(T) );
     31    return (T *)(void*)malloc( (size_t)sizeof(T) );
    3232} // malloc
    3333forall( dtype T | sized(T) ) T * malloc( char fill ) {
    3434        //printf( "malloc3\n" );
    35         T * ptr = (T *)malloc( sizeof(T) );
     35        T * ptr = (T *)(void*)malloc( (size_t)sizeof(T) );
    3636    return memset( ptr, (int)fill, sizeof(T) );
    3737} // malloc
Note: See TracChangeset for help on using the changeset viewer.