@@ -405,7 +405,7 @@ static inline void *audio_stream_wrap(const struct audio_stream *buffer, void *p
405405 ptr = (char * )buffer -> addr +
406406 ((char * )ptr - (char * )buffer -> end_addr );
407407
408- assert ((intptr_t )ptr <= (intptr_t )buffer -> end_addr );
408+ assert ((uintptr_t )ptr <= (uintptr_t )buffer -> end_addr );
409409
410410 return ptr ;
411411}
@@ -422,7 +422,7 @@ static inline void *audio_stream_rewind_wrap(const struct audio_stream *buffer,
422422 if (ptr < buffer -> addr )
423423 ptr = (char * )buffer -> end_addr - ((char * )buffer -> addr - (char * )ptr );
424424
425- assert ((intptr_t )ptr >= (intptr_t )buffer -> addr );
425+ assert ((uintptr_t )ptr >= (uintptr_t )buffer -> addr );
426426
427427 return ptr ;
428428}
@@ -804,8 +804,8 @@ static inline void audio_stream_writeback(struct audio_stream *buffer, uint32_t
804804static inline int
805805audio_stream_bytes_without_wrap (const struct audio_stream * source , const void * ptr )
806806{
807- assert ((intptr_t )source -> end_addr >= (intptr_t )ptr );
808- return (intptr_t )source -> end_addr - (intptr_t )ptr ;
807+ assert ((uintptr_t )source -> end_addr >= (uintptr_t )ptr );
808+ return (uintptr_t )source -> end_addr - (uintptr_t )ptr ;
809809}
810810
811811/**
@@ -819,8 +819,8 @@ audio_stream_bytes_without_wrap(const struct audio_stream *source, const void *p
819819static inline int
820820audio_stream_rewind_bytes_without_wrap (const struct audio_stream * source , const void * ptr )
821821{
822- assert ((intptr_t )ptr >= (intptr_t )source -> addr );
823- int to_begin = (intptr_t )ptr - (intptr_t )source -> addr ;
822+ assert ((uintptr_t )ptr >= (uintptr_t )source -> addr );
823+ size_t to_begin = (uintptr_t )ptr - (uintptr_t )source -> addr ;
824824 return to_begin ;
825825}
826826
@@ -837,8 +837,8 @@ static inline uint32_t
837837 void * wptr = audio_stream_get_wptr (source );
838838 int to_begin = audio_stream_rewind_bytes_without_wrap (source , wptr );
839839
840- assert ((intptr_t )wptr >= (intptr_t )source -> addr );
841- assert ((intptr_t )source -> end_addr > (intptr_t )wptr );
840+ assert ((uintptr_t )wptr >= (uintptr_t )source -> addr );
841+ assert ((uintptr_t )source -> end_addr > (uintptr_t )wptr );
842842
843843 if (to_begin > bytes )
844844 return (uint32_t * )((intptr_t )wptr - bytes );
@@ -858,7 +858,7 @@ audio_stream_samples_without_wrap_s16(const struct audio_stream *source, const v
858858{
859859 int to_end = (int16_t * )source -> end_addr - (int16_t * )ptr ;
860860
861- assert ((intptr_t )source -> end_addr >= (intptr_t )ptr );
861+ assert ((uintptr_t )source -> end_addr >= (uintptr_t )ptr );
862862 return to_end ;
863863}
864864
@@ -874,7 +874,7 @@ audio_stream_samples_without_wrap_s24(const struct audio_stream *source, const v
874874{
875875 int to_end = (int32_t * )source -> end_addr - (int32_t * )ptr ;
876876
877- assert ((intptr_t )source -> end_addr >= (intptr_t )ptr );
877+ assert ((uintptr_t )source -> end_addr >= (uintptr_t )ptr );
878878 return to_end ;
879879}
880880
@@ -890,7 +890,7 @@ audio_stream_samples_without_wrap_s32(const struct audio_stream *source, const v
890890{
891891 int to_end = (int32_t * )source -> end_addr - (int32_t * )ptr ;
892892
893- assert ((intptr_t )source -> end_addr >= (intptr_t )ptr );
893+ assert ((uintptr_t )source -> end_addr >= (uintptr_t )ptr );
894894 return to_end ;
895895}
896896
0 commit comments