st/oxr: Fix missing return, resolve warnings

This commit is contained in:
Ryan Pavlik 2022-07-13 12:53:17 -05:00
parent 7e4c7d8407
commit b08797a4a5
2 changed files with 13 additions and 11 deletions

View file

@ -139,7 +139,7 @@ set_up_local_space(struct oxr_logger *log, struct oxr_session *sess, XrTime time
return true;
}
bool
XRT_CHECK_RESULT bool
is_local_space_set_up(struct oxr_session *sess)
{
return (sess->local_space_pure_relation.relation_flags & XRT_SPACE_RELATION_ORIENTATION_VALID_BIT) != 0;
@ -191,7 +191,7 @@ oxr_space_ref_get_pure_relation(struct oxr_logger *log,
return true;
}
bool
XRT_CHECK_RESULT bool
oxr_space_pure_relation_in_space(struct oxr_logger *log,
XrTime time,
struct xrt_space_relation *relation,
@ -218,7 +218,7 @@ oxr_space_pure_relation_in_space(struct oxr_logger *log,
return true;
}
bool
XRT_CHECK_RESULT bool
oxr_space_pure_pose_in_space(struct oxr_logger *log,
XrTime time,
struct xrt_pose *pose,
@ -231,7 +231,7 @@ oxr_space_pure_pose_in_space(struct oxr_logger *log,
return oxr_space_pure_relation_in_space(log, time, &rel, spc, apply_space_pose, out_relation);
}
bool
XRT_CHECK_RESULT bool
oxr_space_pure_relation_from_space(struct oxr_logger *log,
XrTime time,
struct xrt_space_relation *relation,
@ -252,7 +252,7 @@ oxr_space_pure_relation_from_space(struct oxr_logger *log,
return true;
}
bool
XRT_CHECK_RESULT bool
oxr_space_pure_pose_from_space(struct oxr_logger *log,
XrTime time,
struct xrt_pose *pose,
@ -264,7 +264,7 @@ oxr_space_pure_pose_from_space(struct oxr_logger *log,
return oxr_space_pure_relation_from_space(log, time, &rel, spc, out_relation);
}
bool
XRT_CHECK_RESULT bool
oxr_space_get_pure_relation(struct oxr_logger *log,
struct oxr_space *spc,
XrTime time,
@ -296,7 +296,7 @@ oxr_space_get_pure_relation(struct oxr_logger *log,
return oxr_error(log, false, "Unknown space type");
}
bool
XRT_CHECK_RESULT bool
global_to_local_space(struct oxr_logger *log, struct oxr_session *sess, XrTime time, struct xrt_space_relation *rel)
{
if (!is_local_space_set_up(sess)) {

View file

@ -231,14 +231,15 @@ vk_get_device_ext_props(struct oxr_logger *log,
"vkEnumerateDeviceExtensionProperties");
if (!EnumerateDeviceExtensionProperties) {
oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Failed to get vkEnumerateDeviceExtensionProperties fp");
return oxr_error(log, XR_ERROR_RUNTIME_FAILURE,
"Failed to get vkEnumerateDeviceExtensionProperties fp");
}
uint32_t prop_count = 0;
VkResult res = EnumerateDeviceExtensionProperties(physical_device, NULL, &prop_count, NULL);
if (res != VK_SUCCESS) {
oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Failed to enumerate device extension properties count (%d)",
res);
return oxr_error(log, XR_ERROR_RUNTIME_FAILURE,
"Failed to enumerate device extension properties count (%d)", res);
}
@ -247,7 +248,8 @@ vk_get_device_ext_props(struct oxr_logger *log,
res = EnumerateDeviceExtensionProperties(physical_device, NULL, &prop_count, props);
if (res != VK_SUCCESS) {
free(props);
oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Failed to enumerate device extension properties (%d)", res);
return oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Failed to enumerate device extension properties (%d)",
res);
}
*out_props = props;