@@ -196,7 +196,7 @@ ptp_read_func(
196196 VitaMTP_hex_dump (bytes , xread , 16 );
197197
198198 // want to discard extra byte
199- if (expect_terminator_byte && xread == toread )
199+ if (expect_terminator_byte && xread == ( int ) toread )
200200 {
201201 VitaMTP_Log (VitaMTP_DEBUG , "<==USB IN\nDiscarding extra byte\n" );
202202
@@ -244,7 +244,7 @@ ptp_read_func(
244244 }
245245 }
246246
247- if (xread < toread ) /* short reads are common */
247+ if (xread < ( int ) toread ) /* short reads are common */
248248 break ;
249249 }
250250
@@ -313,7 +313,7 @@ ptp_write_func(
313313 else
314314 {
315315 // This magic makes packets the same size that WMP send them.
316- if (towrite > ptp_usb -> outep_maxpacket && towrite % ptp_usb -> outep_maxpacket != 0 )
316+ if (( int ) towrite > ptp_usb -> outep_maxpacket && towrite % ptp_usb -> outep_maxpacket != 0 )
317317 {
318318 towrite -= towrite % ptp_usb -> outep_maxpacket ;
319319 }
@@ -382,7 +382,7 @@ ptp_write_func(
382382 }
383383 }
384384
385- if (xwritten < towrite ) /* short writes happen */
385+ if (xwritten < ( int ) towrite ) /* short writes happen */
386386 break ;
387387 }
388388
@@ -597,7 +597,8 @@ ptp_usb_senddata(PTPParams *params, PTPContainer *ptp,
597597 )
598598{
599599 uint16_t ret = PTP_RC_OK ;
600- int wlen , datawlen ;
600+ int wlen ;
601+ unsigned long datawlen ;
601602 PTPUSBBulkContainer usbdata ;
602603 unsigned long bytes_left_to_transfer , written ;
603604 PTPDataHandler memhandler ;
@@ -1095,7 +1096,7 @@ ptp_usb_control_cancel_request(PTPParams *params, uint32_t transactionid)
10951096 sizeof (buffer ),
10961097 ptp_usb -> timeout );
10971098
1098- if (ret < sizeof (buffer ))
1099+ if (ret < ( int ) sizeof (buffer ))
10991100 return PTP_ERROR_IO ;
11001101
11011102 return PTP_RC_OK ;
0 commit comments