Fix various warnings

This commit is contained in:
Guillaume Meunier
2024-10-01 23:04:19 +02:00
parent 66df936294
commit 5e6512d825
7 changed files with 10 additions and 8 deletions
+2
View File
@@ -176,6 +176,7 @@ const char * permission_name(feature f)
case model::unknown:
return nullptr;
}
__builtin_unreachable();
case feature::face_tracking:
switch (guess_model())
{
@@ -192,6 +193,7 @@ const char * permission_name(feature f)
case model::unknown:
return nullptr;
}
__builtin_unreachable();
}
__builtin_unreachable();
}
+2 -2
View File
@@ -35,7 +35,7 @@ std::pair<vk::raii::Buffer, VmaAllocation> basic_allocation_traits<VkBuffer>::cr
VmaAllocation allocation;
VkBuffer tmp;
CHECK_VK(vmaCreateBuffer(allocator, &(NativeCreateInfo &)buffer_info, &alloc_info, &tmp, &allocation, nullptr));
CHECK_VK(vmaCreateBuffer(allocator, &(const NativeCreateInfo &)buffer_info, &alloc_info, &tmp, &allocation, nullptr));
return std::pair<vk::raii::Buffer, VmaAllocation>{vk::raii::Buffer{device, tmp}, allocation};
}
@@ -79,7 +79,7 @@ std::pair<vk::raii::Image, VmaAllocation> basic_allocation_traits<VkImage>::crea
VmaAllocation allocation;
VkImage tmp;
CHECK_VK(vmaCreateImage(allocator, &(NativeCreateInfo &)image_info, &alloc_info, &tmp, &allocation, nullptr));
CHECK_VK(vmaCreateImage(allocator, &(const NativeCreateInfo &)image_info, &alloc_info, &tmp, &allocation, nullptr));
return std::pair<vk::raii::Image, VmaAllocation>{vk::raii::Image{device, tmp}, allocation};
}
+1 -1
View File
@@ -478,7 +478,7 @@ void xrt::drivers::wivrn::TCP::send_raw(const std::vector<std::span<uint8_t>> &
}
if (hdr.msg_iovlen == 0)
return;
*(uintptr_t *)&hdr.msg_iov[0].iov_base += sent;
hdr.msg_iov[0].iov_base = (void *)((uintptr_t)hdr.msg_iov[0].iov_base + sent);
hdr.msg_iov[0].iov_len -= sent;
}
}
+1 -1
View File
@@ -51,7 +51,7 @@ std::filesystem::path active_runtime::manifest_path()
}
active_runtime::active_runtime() :
pid(getpid()), active_runtime_json(xdg_config_home() / "openxr/1/active_runtime.json")
active_runtime_json(xdg_config_home() / "openxr/1/active_runtime.json"), pid(getpid())
{
try
{
+2 -2
View File
@@ -196,7 +196,7 @@ void pipewire_device::mic_process(void * self_v)
auto buffer = pw_stream_dequeue_buffer(self->microphone.get());
if (not buffer)
{
pw_log_warn("Out of buffers: %m");
U_LOG_W("Out of buffers: %s", strerror(errno));
return;
}
@@ -264,7 +264,7 @@ void pipewire_device::speaker_process(void * self_v)
auto buffer = pw_stream_dequeue_buffer(self->speaker.get());
if (not buffer)
{
pw_log_warn("Out of buffers: %m");
U_LOG_W("Out of buffers: %s", strerror(errno));
return;
}
+1 -1
View File
@@ -134,7 +134,7 @@ void avahi_publisher::client_callback(AvahiClient * s,
}
avahi_publisher::avahi_publisher(const AvahiPoll * poll_api, const std::string & name, std::string type, int port, const std::map<std::string, std::string> & txt) :
poll_api(poll_api), name(avahi_strdup(name.c_str())), type(std::move(type)), port(port)
name(avahi_strdup(name.c_str())), type(std::move(type)), port(port), poll_api(poll_api)
{
for (const auto & [key, value]: txt)
{
+1 -1
View File
@@ -75,7 +75,7 @@ av_buffer_ptr make_hwframe_ctx(AVBufferRef * hw_device_ctx, AVPixelFormat hw_for
{
throw std::system_error(err, av_error_category(), "Failed to initialize frame context");
}
return std::move(hw_frames_ref);
return hw_frames_ref;
}
std::optional<std::filesystem::path>