diff --git a/common/audio/s9x_sound_driver_pulse.cpp b/common/audio/s9x_sound_driver_pulse.cpp index ebe2a167..7e9c444c 100644 --- a/common/audio/s9x_sound_driver_pulse.cpp +++ b/common/audio/s9x_sound_driver_pulse.cpp @@ -191,7 +191,7 @@ bool S9xPulseSoundDriver::write_samples(int16_t *data, int samples) if (draining) { - if (bytes > buffer_size / 2) + if (bytes > (size_t)buffer_size / 2) { return false; } @@ -201,13 +201,13 @@ bool S9xPulseSoundDriver::write_samples(int16_t *data, int samples) } } - if (samples * 2 > bytes) + if ((size_t)samples * 2 > bytes) { draining = true; return false; } - if (samples * 2 < bytes) + if ((size_t)samples * 2 < bytes) bytes = samples * 2; if (bytes == 0) diff --git a/vulkan/vulkan_context.cpp b/vulkan/vulkan_context.cpp index babaa79b..4f459c79 100644 --- a/vulkan/vulkan_context.cpp +++ b/vulkan/vulkan_context.cpp @@ -205,7 +205,7 @@ bool Context::init_device(int preferred_device) return device_list[0]; }; - if (preferred_device > -1 && preferred_device < device_list.size()) + if (preferred_device > -1 && (size_t)preferred_device < device_list.size()) physical_device = device_list[preferred_device]; else physical_device = find_device(); diff --git a/vulkan/vulkan_simple_output.cpp b/vulkan/vulkan_simple_output.cpp index 465e8a71..be0183c2 100644 --- a/vulkan/vulkan_simple_output.cpp +++ b/vulkan/vulkan_simple_output.cpp @@ -55,7 +55,7 @@ SimpleOutput::~SimpleOutput() void SimpleOutput::create_objects() { descriptors.clear(); - for (size_t i = 0; i < queue_size; i++) + for (int i = 0; i < queue_size; i++) { vk::DescriptorSetAllocateInfo dsai{}; dsai