From 4236fb2d63cf59c55ea8c302594659d2e00aa371 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 17 Jun 2024 15:01:21 -0700 Subject: [PATCH] Fixed build warnings with Android debug logging --- src/hidapi/android/hid.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hidapi/android/hid.cpp b/src/hidapi/android/hid.cpp index ea8d279728..b15f8ba5d7 100644 --- a/src/hidapi/android/hid.cpp +++ b/src/hidapi/android/hid.cpp @@ -713,7 +713,7 @@ public: size_t uBytesToCopy = m_reportResponse.size() > nDataLen ? nDataLen : m_reportResponse.size(); SDL_memcpy( pData, m_reportResponse.data(), uBytesToCopy ); m_reportResponse.clear(); - LOGV( "=== Got %u bytes", uBytesToCopy ); + LOGV( "=== Got %zu bytes", uBytesToCopy ); return (int)uBytesToCopy; } @@ -1159,7 +1159,7 @@ int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned ch { if ( device ) { - LOGV( "hid_write id=%d length=%u", device->m_nId, length ); + LOGV( "hid_write id=%d length=%zu", device->m_nId, length ); hid_device_ref pDevice = FindDevice( device->m_nId ); if ( pDevice ) { @@ -1223,7 +1223,7 @@ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned ch // TODO: Implement blocking int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length) { - LOGV( "hid_read id=%d length=%u", device->m_nId, length ); + LOGV( "hid_read id=%d length=%zu", device->m_nId, length ); return hid_read_timeout( device, data, length, 0 ); } @@ -1237,7 +1237,7 @@ int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, cons { if ( device ) { - LOGV( "hid_send_feature_report id=%d length=%u", device->m_nId, length ); + LOGV( "hid_send_feature_report id=%d length=%zu", device->m_nId, length ); hid_device_ref pDevice = FindDevice( device->m_nId ); if ( pDevice ) { @@ -1253,7 +1253,7 @@ int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsig { if ( device ) { - LOGV( "hid_get_feature_report id=%d length=%u", device->m_nId, length ); + LOGV( "hid_get_feature_report id=%d length=%zu", device->m_nId, length ); hid_device_ref pDevice = FindDevice( device->m_nId ); if ( pDevice ) { @@ -1269,7 +1269,7 @@ int HID_API_EXPORT HID_API_CALL hid_get_input_report(hid_device *device, unsigne { if ( device ) { - LOGV( "hid_get_input_report id=%d length=%u", device->m_nId, length ); + LOGV( "hid_get_input_report id=%d length=%zu", device->m_nId, length ); hid_device_ref pDevice = FindDevice( device->m_nId ); if ( pDevice ) {