From 614a09db1de555659801e39565d02b0d85cebc65 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 13 Jul 2020 18:11:57 +0200 Subject: [PATCH] Fix some compile warnings --- 3rdparty/taglib/mp4/mp4item.cpp | 4 ++-- 3rdparty/taglib/mp4/mp4item.h | 2 +- src/core/macfslistener.mm | 2 +- src/device/macosdevicelister.mm | 6 +++--- src/engine/macosdevicefinder.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/3rdparty/taglib/mp4/mp4item.cpp b/3rdparty/taglib/mp4/mp4item.cpp index 6f4439508..751cfb1bb 100644 --- a/3rdparty/taglib/mp4/mp4item.cpp +++ b/3rdparty/taglib/mp4/mp4item.cpp @@ -57,7 +57,7 @@ class MP4::Item::ItemPrivate { explicit ItemPrivate() : data(new ItemData()) { data->valid = true; data->atomDataType = MP4::TypeUndefined; - data->type = MP4::Item::TypeUndefined; + data->type = MP4::Item::TypeUndefined_; } std::shared_ptr data; @@ -207,7 +207,7 @@ String MP4::Item::toString() const { desc.append(Utils::formatString("[%d bytes of data]", static_cast(d->data->m_coverArtList[i].data().size()))); } return desc.toString(", "); - case TypeUndefined: + case TypeUndefined_: return "[unknown]"; } return String(); diff --git a/3rdparty/taglib/mp4/mp4item.h b/3rdparty/taglib/mp4/mp4item.h index 94bcc0818..c2c580ddf 100644 --- a/3rdparty/taglib/mp4/mp4item.h +++ b/3rdparty/taglib/mp4/mp4item.h @@ -41,7 +41,7 @@ class TAGLIB_EXPORT Item { }; enum ItemType { - TypeUndefined = 0, + TypeUndefined_ = 0, TypeBool, TypeInt, TypeIntPair, diff --git a/src/core/macfslistener.mm b/src/core/macfslistener.mm index d21e7e688..28123fa50 100644 --- a/src/core/macfslistener.mm +++ b/src/core/macfslistener.mm @@ -49,7 +49,7 @@ void MacFSListener::EventStreamCallback(ConstFSEventStreamRef stream, void* user MacFSListener* me = reinterpret_cast(user_data); char** paths = reinterpret_cast(event_paths); - for (int i = 0; i < num_events; ++i) { + for (size_t i = 0; i < num_events; ++i) { QString path = QString::fromUtf8(paths[i]); qLog(Debug) << "Something changed at:" << path; while (path.endsWith('/')) { diff --git a/src/device/macosdevicelister.mm b/src/device/macosdevicelister.mm index fa78ec7e7..88dfd1b08 100644 --- a/src/device/macosdevicelister.mm +++ b/src/device/macosdevicelister.mm @@ -533,10 +533,10 @@ void MacOsDeviceLister::USBDeviceAddedCallback(void* refcon, io_iterator_t it) { device.address = [addr intValue]; // First check the libmtp device list. - QSet::const_iterator it = sMTPDeviceList.find(device); - if (it != sMTPDeviceList.end()) { + QSet::const_iterator it2 = sMTPDeviceList.find(device); + if (it2 != sMTPDeviceList.end()) { // Fill in quirks flags from libmtp. - device.quirks = it->quirks; + device.quirks = it2->quirks; me->FoundMTPDevice(device, GetSerialForMTPDevice(object)); continue; } diff --git a/src/engine/macosdevicefinder.cpp b/src/engine/macosdevicefinder.cpp index db4199eee..f61077496 100644 --- a/src/engine/macosdevicefinder.cpp +++ b/src/engine/macosdevicefinder.cpp @@ -81,7 +81,7 @@ QList MacOsDeviceFinder::ListDevices() { if (!devices.get()) { return ret; } - const int device_count = device_size_bytes / sizeof(AudioDeviceID); + const UInt32 device_count = device_size_bytes / sizeof(AudioDeviceID); address.mScope = kAudioDevicePropertyScopeOutput; for (UInt32 i = 0; i < device_count; ++i) {