1
1

Working around the warnings. Unfortunately, this patch will be split

in several commits.

This commit was SVN r13420.
Этот коммит содержится в:
George Bosilca 2007-02-01 17:58:18 +00:00
родитель b611e6d7dc
Коммит 9e3962b85d

Просмотреть файл

@ -120,10 +120,10 @@ int ompi_convertor_generic_simple_position( ompi_convertor_t* pConvertor,
if( iov_len_local > pConvertor->pDesc->size ) { if( iov_len_local > pConvertor->pDesc->size ) {
pStack = pConvertor->pStack; /* we're working with the full stack */ pStack = pConvertor->pStack; /* we're working with the full stack */
count_desc = (uint32_t)(iov_len_local / pConvertor->pDesc->size); count_desc = (uint32_t)(iov_len_local / pConvertor->pDesc->size);
DO_DEBUG( opal_output( 0, "position before %ld asked %ld data size %d" DO_DEBUG( opal_output( 0, "position before %ld asked %ld data size %lu"
" iov_len_local %d count_desc %d\n", " iov_len_local %lu count_desc %d\n",
pConvertor->bConverted, *position, pConvertor->pDesc->size, pConvertor->bConverted, *position, (unsigned long)pConvertor->pDesc->size,
iov_len_local, count_desc ); ); (unsigned long)iov_len_local, count_desc ); );
/** /**
* Update all the stack except the last one which is supposed to be for * Update all the stack except the last one which is supposed to be for
* the last partial element description. * the last partial element description.
@ -133,8 +133,8 @@ int ompi_convertor_generic_simple_position( ompi_convertor_t* pConvertor,
pConvertor->bConverted += count_desc * pConvertor->pDesc->size; pConvertor->bConverted += count_desc * pConvertor->pDesc->size;
iov_len_local = *position - pConvertor->bConverted; iov_len_local = *position - pConvertor->bConverted;
pStack[0].count -= count_desc; pStack[0].count -= count_desc;
DO_DEBUG( opal_output( 0, "after bConverted %ld remaining count %d iov_len_local %d\n", DO_DEBUG( opal_output( 0, "after bConverted %ld remaining count %lu iov_len_local %lu\n",
pConvertor->bConverted, pStack[0].count, iov_len_local ); ); pConvertor->bConverted, (unsigned long)pStack[0].count, (unsigned long)iov_len_local ); );
} }
pStack = pConvertor->pStack + pConvertor->stack_pos; pStack = pConvertor->pStack + pConvertor->stack_pos;
@ -146,15 +146,16 @@ int ompi_convertor_generic_simple_position( ompi_convertor_t* pConvertor,
pElem = &(description[pos_desc]); pElem = &(description[pos_desc]);
base_pointer += pStack->disp; base_pointer += pStack->disp;
DO_DEBUG( opal_output( 0, "position start pos_desc %d count_desc %d disp %ld\n" DO_DEBUG( opal_output( 0, "position start pos_desc %d count_desc %d disp %llx\n"
"stack_pos %d pos_desc %d count_desc %d disp %ld\n", "stack_pos %d pos_desc %d count_desc %d disp %llx\n",
pos_desc, count_desc, base_pointer - pConvertor->pBaseBuf, pos_desc, count_desc, (unsigned long long)(base_pointer - pConvertor->pBaseBuf),
pConvertor->stack_pos, pStack->index, pStack->count, pStack->disp ); ); pConvertor->stack_pos, pStack->index, (int)pStack->count, (unsigned long long)pStack->disp ); );
while( 1 ) { while( 1 ) {
if( DT_END_LOOP == pElem->elem.common.type ) { /* end of the current loop */ if( DT_END_LOOP == pElem->elem.common.type ) { /* end of the current loop */
DO_DEBUG( opal_output( 0, "position end_loop count %d stack_pos %d pos_desc %d disp %ld space %d\n", DO_DEBUG( opal_output( 0, "position end_loop count %d stack_pos %d pos_desc %d disp %llx space %lu\n",
pStack->count, pConvertor->stack_pos, pos_desc, pStack->disp, iov_len_local ); ); (int)pStack->count, pConvertor->stack_pos, pos_desc,
(unsigned long long)pStack->disp, (unsigned long)iov_len_local ); );
if( --(pStack->count) == 0 ) { /* end of loop */ if( --(pStack->count) == 0 ) { /* end of loop */
if( pConvertor->stack_pos == 0 ) { if( pConvertor->stack_pos == 0 ) {
pConvertor->flags |= CONVERTOR_COMPLETED; pConvertor->flags |= CONVERTOR_COMPLETED;
@ -175,8 +176,9 @@ int ompi_convertor_generic_simple_position( ompi_convertor_t* pConvertor,
} }
base_pointer = pConvertor->pBaseBuf + pStack->disp; base_pointer = pConvertor->pBaseBuf + pStack->disp;
UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc ); UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc );
DO_DEBUG( opal_output( 0, "position new_loop count %d stack_pos %d pos_desc %d disp %ld space %d\n", DO_DEBUG( opal_output( 0, "position new_loop count %d stack_pos %d pos_desc %d disp %llx space %lu\n",
pStack->count, pConvertor->stack_pos, pos_desc, pStack->disp, iov_len_local ); ); (int)pStack->count, pConvertor->stack_pos, pos_desc,
(unsigned long long)pStack->disp, (unsigned long)iov_len_local ); );
} }
if( DT_LOOP == pElem->elem.common.type ) { if( DT_LOOP == pElem->elem.common.type ) {
ptrdiff_t local_disp = (ptrdiff_t)base_pointer; ptrdiff_t local_disp = (ptrdiff_t)base_pointer;
@ -220,8 +222,8 @@ int ompi_convertor_generic_simple_position( ompi_convertor_t* pConvertor,
/* I complete an element, next step I should go to the next one */ /* I complete an element, next step I should go to the next one */
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, DT_BYTE, count_desc, PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, DT_BYTE, count_desc,
base_pointer - pStack->disp - pConvertor->pBaseBuf ); base_pointer - pStack->disp - pConvertor->pBaseBuf );
DO_DEBUG( opal_output( 0, "position save stack stack_pos %d pos_desc %d count_desc %d disp %ld\n", DO_DEBUG( opal_output( 0, "position save stack stack_pos %d pos_desc %d count_desc %d disp %llx\n",
pConvertor->stack_pos, pStack->index, pStack->count, pStack->disp ); ); pConvertor->stack_pos, pStack->index, (int)pStack->count, (unsigned long long)pStack->disp ); );
return 0; return 0;
} }
return 1; return 1;