fixed `-Wunused-function` compiler warnings

This commit is contained in:
firewave 2023-10-20 17:20:32 +02:00
parent 5db94568ec
commit 5eed76f32b
5 changed files with 10 additions and 1166 deletions

File diff suppressed because it is too large Load Diff

View File

@ -49,14 +49,6 @@ xrdp_fastpath_delete(struct xrdp_fastpath *self)
g_free(self); g_free(self);
} }
/*****************************************************************************/
/* returns error */
static int
xrdp_fastpath_reset(struct xrdp_fastpath *self)
{
return 0;
}
/*****************************************************************************/ /*****************************************************************************/
int int
xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s) xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s)

View File

@ -191,6 +191,7 @@ devredir_deinit(void)
/*****************************************************************************/ /*****************************************************************************/
#ifdef USE_DEVEL_LOGGING
/* /*
* Convert a COMPLETION_TYPE to a string * Convert a COMPLETION_TYPE to a string
*/ */
@ -213,6 +214,7 @@ static const char *completion_type_to_str(enum COMPLETION_TYPE cid)
(cid == CID_SETATTR) ? "CID_SETATTR" : (cid == CID_SETATTR) ? "CID_SETATTR" :
/* default */ "<unknown>"; /* default */ "<unknown>";
}; };
#endif
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1714,6 +1714,7 @@ rail_configure_request_window(XConfigureRequestEvent *config)
} }
/*****************************************************************************/ /*****************************************************************************/
#if 0
/* returns 0, event handled, 1 unhandled */ /* returns 0, event handled, 1 unhandled */
static int static int
rail_configure_window(XConfigureEvent *config) rail_configure_window(XConfigureEvent *config)
@ -1796,6 +1797,7 @@ rail_configure_window(XConfigureEvent *config)
free_stream(s); free_stream(s);
return 0; return 0;
} }
#endif
/*****************************************************************************/ /*****************************************************************************/
static int static int

View File

@ -61,7 +61,9 @@ static pixman_box16_t test_box =
0, 0, 100, 100 0, 0, 100, 100
}; };
static pixman_box16_t *__wrap_pixman_region_extents(pixman_region16_t *region) // cmocka requires this to be externally linkable
extern pixman_box16_t *__wrap_pixman_region_extents(pixman_region16_t *region);
pixman_box16_t *__wrap_pixman_region_extents(pixman_region16_t *region)
{ {
check_expected_ptr(region); check_expected_ptr(region);
return mock_ptr_type(pixman_box16_t *); return mock_ptr_type(pixman_box16_t *);
@ -107,7 +109,9 @@ static void test_xrdp_region_get_bounds__happy_path(void **state)
g_free(rect); g_free(rect);
} }
static pixman_bool_t __wrap_pixman_region_not_empty(pixman_region16_t *region) // cmocka requires this to be externally linkable
extern pixman_bool_t __wrap_pixman_region_not_empty(pixman_region16_t *region);
pixman_bool_t __wrap_pixman_region_not_empty(pixman_region16_t *region)
{ {
check_expected_ptr(region); check_expected_ptr(region);
return mock_type(pixman_bool_t); return mock_type(pixman_bool_t);