Changeset 473 for trunk/libs/libalmosmkh
- Timestamp:
- Aug 21, 2018, 6:01:01 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/libalmosmkh/almosmkh.c
r457 r473 434 434 435 435 // check store size power of 2 436 if( store_size != ( 1<<free_index) )436 if( store_size != (unsigned int)(1<<free_index) ) 437 437 { 438 438 printf("\n[ERROR] in %s : store[%x] size not power of 2 / size = %x\n", … … 557 557 { 558 558 // test terminal case 559 if ( ( 1<<searched_index) > store->store_size ) // failure : return a NULL value559 if ( (unsigned int)(1<<searched_index) > store->store_size ) // failure 560 560 { 561 561 return 0; … … 729 729 730 730 // 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)); 733 733 734 734 // allocate a new block … … 736 736 737 737 // 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); 739 739 memcpy( new_ptr, ptr, min_size ); 740 740
Note: See TracChangeset
for help on using the changeset viewer.