mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
t/common: Use same return type as in interface.
Fixes GCC 13 warning [-Wenum-int-mismatch]. Return xrt_result_t in the implementation of xrt_instance_create in target_instance_no_comp.c, as declared in xrt_instance.h and already done in target_instance.c. Return proper xrt_result_t instead of plain ints.
This commit is contained in:
parent
6956042fb4
commit
1761d98a2e
|
@ -56,7 +56,7 @@ t_instance_create_system(struct xrt_instance *xinst,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
xrt_result_t
|
||||||
xrt_instance_create(struct xrt_instance_info *ii, struct xrt_instance **out_xinst)
|
xrt_instance_create(struct xrt_instance_info *ii, struct xrt_instance **out_xinst)
|
||||||
{
|
{
|
||||||
XRT_TRACE_MARKER();
|
XRT_TRACE_MARKER();
|
||||||
|
@ -65,7 +65,7 @@ xrt_instance_create(struct xrt_instance_info *ii, struct xrt_instance **out_xins
|
||||||
|
|
||||||
int ret = xrt_prober_create_with_lists(&xp, &target_lists);
|
int ret = xrt_prober_create_with_lists(&xp, &target_lists);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
return ret;
|
return XRT_ERROR_PROBER_CREATION_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct t_instance *tinst = U_TYPED_CALLOC(struct t_instance);
|
struct t_instance *tinst = U_TYPED_CALLOC(struct t_instance);
|
||||||
|
@ -76,5 +76,5 @@ xrt_instance_create(struct xrt_instance_info *ii, struct xrt_instance **out_xins
|
||||||
|
|
||||||
*out_xinst = &tinst->base;
|
*out_xinst = &tinst->base;
|
||||||
|
|
||||||
return 0;
|
return XRT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue