Changeset 473 for trunk/libs/libalmosmkh


Ignore:
Timestamp:
Aug 21, 2018, 6:01:01 PM (6 years ago)
Author:
alain
Message:

Fix several GCC warning related to the -Wextra compilation option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/libalmosmkh/almosmkh.c

    r457 r473  
    434434
    435435    // check store size power of 2
    436     if( store_size != (1<<free_index) )
     436    if( store_size != (unsigned int)(1<<free_index) )
    437437    {
    438438        printf("\n[ERROR] in %s : store[%x] size not power of 2 / size = %x\n",
     
    557557{
    558558    // test terminal case
    559     if ( (1<<searched_index) > store->store_size )  // failure : return a NULL value
     559    if ( (unsigned int)(1<<searched_index) > store->store_size )  // failure
    560560    {
    561561        return 0;
     
    729729
    730730    // compute old size
    731     char * pchar = (char *) (store[cxy].alloc_base + index);
    732     int old_size = 1 << ((int) *pchar);
     731    char        * pchar    = (char *) (store[cxy].alloc_base + index);
     732    unsigned int  old_size = (unsigned int)(1 << ((int) *pchar));
    733733
    734734    // allocate a new block
     
    736736
    737737    // save old data to new block
    738     int min_size = (size < old_size) ? size : old_size;
     738    int min_size = (int)((size < old_size) ? size : old_size);
    739739    memcpy( new_ptr, ptr, min_size );
    740740
Note: See TracChangeset for help on using the changeset viewer.