@@ -43,11 +43,11 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
4343 const opal_datatype_t * pData = pConvertor -> pDesc ;
4444 dt_stack_t * pStack ; /* pointer to the position on the stack */
4545 uint32_t pos_desc ; /* actual position in the description of the derived datatype */
46- uint32_t count_desc ; /* the number of items already done in the actual pos_desc */
46+ size_t count_desc ; /* the number of items already done in the actual pos_desc */
4747 dt_elem_desc_t * description , * pElem ;
4848 unsigned char * source_base ; /* origin of the data */
4949 size_t raw_data = 0 ; /* sum of raw data lengths in the iov_len fields */
50- uint32_t index = 0 , i ; /* the iov index and a simple counter */
50+ uint32_t index = 0 ; /* the iov index and a simple counter */
5151
5252 assert ( (* iov_count ) > 0 );
5353 if ( OPAL_LIKELY (pConvertor -> flags & CONVERTOR_COMPLETED ) ) {
@@ -83,15 +83,15 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
8383 pStack = pConvertor -> pStack + pConvertor -> stack_pos ;
8484 pos_desc = pStack -> index ;
8585 source_base = pConvertor -> pBaseBuf + pStack -> disp ;
86- count_desc = ( uint32_t ) pStack -> count ;
86+ count_desc = pStack -> count ;
8787 pStack -- ;
8888 pConvertor -> stack_pos -- ;
8989 pElem = & (description [pos_desc ]);
9090 source_base += pStack -> disp ;
91- DO_DEBUG ( opal_output ( 0 , "raw start pos_desc %d count_desc %d disp %ld\n"
92- "stack_pos %d pos_desc %d count_desc %d disp %ld\n" ,
91+ DO_DEBUG ( opal_output ( 0 , "raw start pos_desc %d count_desc %" PRIsize_t " disp %ld\n"
92+ "stack_pos %d pos_desc %d count_desc %" PRIsize_t " disp %ld\n" ,
9393 pos_desc , count_desc , (long )(source_base - pConvertor -> pBaseBuf ),
94- pConvertor -> stack_pos , pStack -> index , ( int ) pStack -> count , (long )pStack -> disp ); );
94+ pConvertor -> stack_pos , pStack -> index , pStack -> count , (long )pStack -> disp ); );
9595 while ( 1 ) {
9696 while ( pElem -> elem .common .flags & OPAL_DATATYPE_FLAG_DATA ) {
9797 size_t blength = opal_datatype_basicDatatypes [pElem -> elem .common .type ]-> size ;
@@ -112,7 +112,7 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
112112 count_desc = 0 ;
113113 }
114114 } else {
115- for ( i = count_desc ; (i > 0 ) && (index < * iov_count ); i -- , index ++ ) {
115+ for (size_t i = count_desc ; (i > 0 ) && (index < * iov_count ); i -- , index ++ ) {
116116 OPAL_DATATYPE_SAFEGUARD_POINTER ( source_base , blength , pConvertor -> pBaseBuf ,
117117 pConvertor -> pDesc , pConvertor -> count );
118118 DO_DEBUG ( opal_output ( 0 , "raw 2. iov[%d] = {base %p, length %" PRIsize_t "}\n" ,
@@ -134,9 +134,9 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
134134 goto complete_loop ;
135135 }
136136 if ( OPAL_DATATYPE_END_LOOP == pElem -> elem .common .type ) { /* end of the current loop */
137- DO_DEBUG ( opal_output ( 0 , "raw end_loop count %d stack_pos %d"
137+ DO_DEBUG ( opal_output ( 0 , "raw end_loop count %" PRIsize_t " stack_pos %d"
138138 " pos_desc %d disp %ld space %lu\n" ,
139- ( int ) pStack -> count , pConvertor -> stack_pos ,
139+ pStack -> count , pConvertor -> stack_pos ,
140140 pos_desc , (long )pStack -> disp , (unsigned long )raw_data ); );
141141 if ( -- (pStack -> count ) == 0 ) { /* end of loop */
142142 if ( pConvertor -> stack_pos == 0 ) {
@@ -160,9 +160,9 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
160160 }
161161 source_base = pConvertor -> pBaseBuf + pStack -> disp ;
162162 UPDATE_INTERNAL_COUNTERS ( description , pos_desc , pElem , count_desc );
163- DO_DEBUG ( opal_output ( 0 , "raw new_loop count %d stack_pos %d "
163+ DO_DEBUG ( opal_output ( 0 , "raw new_loop count %" PRIsize_t " stack_pos %d "
164164 "pos_desc %d disp %ld space %lu\n" ,
165- ( int ) pStack -> count , pConvertor -> stack_pos ,
165+ pStack -> count , pConvertor -> stack_pos ,
166166 pos_desc , (long )pStack -> disp , (unsigned long )raw_data ); );
167167 }
168168 if ( OPAL_DATATYPE_LOOP == pElem -> elem .common .type ) {
@@ -172,7 +172,7 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
172172 if ( pElem -> loop .common .flags & OPAL_DATATYPE_FLAG_CONTIGUOUS ) {
173173 ptrdiff_t offset = end_loop -> first_elem_disp ;
174174 source_base += offset ;
175- for (uint32_t i = MIN (count_desc , * iov_count - index ); i > 0 ; i -- , index ++ ) {
175+ for (size_t i = MIN (count_desc , * iov_count - index ); i > 0 ; i -- , index ++ ) {
176176 OPAL_DATATYPE_SAFEGUARD_POINTER ( source_base , end_loop -> size , pConvertor -> pBaseBuf ,
177177 pConvertor -> pDesc , pConvertor -> count );
178178 iov [index ].iov_base = (IOVBASE_TYPE * ) source_base ;
@@ -216,7 +216,7 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
216216 /* I complete an element, next step I should go to the next one */
217217 PUSH_STACK ( pStack , pConvertor -> stack_pos , pos_desc , OPAL_DATATYPE_UINT1 , count_desc ,
218218 source_base - pStack -> disp - pConvertor -> pBaseBuf );
219- DO_DEBUG ( opal_output ( 0 , "raw save stack stack_pos %d pos_desc %d count_desc %d disp %ld\n" ,
220- pConvertor -> stack_pos , pStack -> index , ( int ) pStack -> count , (long )pStack -> disp ); );
219+ DO_DEBUG ( opal_output ( 0 , "raw save stack stack_pos %d pos_desc %d count_desc %" PRIsize_t " disp %ld\n" ,
220+ pConvertor -> stack_pos , pStack -> index , pStack -> count , (long )pStack -> disp ); );
221221 return 0 ;
222222}
0 commit comments