Fixed dpkg-buildpackage warnings

This commit is contained in:
akallabeth 2021-06-30 10:19:16 +02:00 committed by akallabeth
parent c3a85432b8
commit 242f1734ec
8 changed files with 32 additions and 23 deletions

View File

@ -443,7 +443,7 @@ BOOL wlf_handle_touch_down(freerdp* instance, const UwacTouchDown* ev)
return FALSE; return FALSE;
context = (wlfContext*)instance->context; context = (wlfContext*)instance->context;
RdpeiClientContext* rdpei = ((wlfContext*)instance->context)->rdpei; RdpeiClientContext* rdpei = context->rdpei;
// Emulate mouse click if touch is not possible, like in login screen // Emulate mouse click if touch is not possible, like in login screen
if (!rdpei) if (!rdpei)

View File

@ -183,6 +183,11 @@ static BOOL create_floatbar(xfFloatbar* floatbar)
xfc = floatbar->xfc; xfc = floatbar->xfc;
status = XGetWindowAttributes(xfc->display, floatbar->root_window, &attr); status = XGetWindowAttributes(xfc->display, floatbar->root_window, &attr);
if (status != 0)
{
WLog_WARN(TAG, "XGetWindowAttributes returned %d", status);
return FALSE;
}
floatbar->x = attr.x + attr.width / 2 - FLOATBAR_DEFAULT_WIDTH / 2; floatbar->x = attr.x + attr.width / 2 - FLOATBAR_DEFAULT_WIDTH / 2;
floatbar->y = 0; floatbar->y = 0;

View File

@ -633,7 +633,6 @@ static BOOL xf_Glyph_BeginDraw(rdpContext* context, INT32 x, INT32 y, INT32 widt
UINT32 bgcolor, UINT32 fgcolor, BOOL fOpRedundant) UINT32 bgcolor, UINT32 fgcolor, BOOL fOpRedundant)
{ {
xfContext* xfc = (xfContext*)context; xfContext* xfc = (xfContext*)context;
XRectangle rect;
XColor xbgcolor, xfgcolor; XColor xbgcolor, xfgcolor;
if (!xf_decode_color(xfc, bgcolor, &xbgcolor)) if (!xf_decode_color(xfc, bgcolor, &xbgcolor))
@ -642,10 +641,6 @@ static BOOL xf_Glyph_BeginDraw(rdpContext* context, INT32 x, INT32 y, INT32 widt
if (!xf_decode_color(xfc, fgcolor, &xfgcolor)) if (!xf_decode_color(xfc, fgcolor, &xfgcolor))
return FALSE; return FALSE;
rect.x = x;
rect.y = y;
rect.width = width;
rect.height = height;
xf_lock_x11(xfc); xf_lock_x11(xfc);
if (!fOpRedundant) if (!fOpRedundant)

View File

@ -95,7 +95,6 @@ int xf_input_init(xfContext* xfc, Window window)
int ndevices; int ndevices;
int major = 2; int major = 2;
int minor = 2; int minor = 2;
Status xstatus;
XIDeviceInfo* info; XIDeviceInfo* info;
XIEventMask evmasks[64]; XIEventMask evmasks[64];
int opcode, event, error; int opcode, event, error;
@ -196,7 +195,11 @@ int xf_input_init(xfContext* xfc, Window window)
XIFreeDeviceInfo(info); XIFreeDeviceInfo(info);
if (nmasks > 0) if (nmasks > 0)
xstatus = XISelectEvents(xfc->display, window, evmasks, nmasks); {
Status xstatus = XISelectEvents(xfc->display, window, evmasks, nmasks);
if (xstatus != 0)
WLog_WARN(TAG, "XISelectEvents returned %d", xstatus);
}
return 0; return 0;
} }

View File

@ -402,7 +402,7 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
attrs->physicalWidth = rrmonitors[i].mwidth; attrs->physicalWidth = rrmonitors[i].mwidth;
attrs->physicalHeight = rrmonitors[i].mheight; attrs->physicalHeight = rrmonitors[i].mheight;
ret = XRRRotations(xfc->display, i, &rot); ret = XRRRotations(xfc->display, i, &rot);
attrs->orientation = rot; attrs->orientation = ret;
} }
#endif #endif

View File

@ -497,19 +497,27 @@ xfWindow* xf_CreateDesktopWindow(xfContext* xfc, char* name, int width, int heig
} }
else else
{ {
void* mem; int rc = ftruncate(window->shmid, sizeof(window->handle));
ftruncate(window->shmid, sizeof(window->handle)); if (rc != 0)
mem = mmap(0, sizeof(window->handle), PROT_READ | PROT_WRITE, MAP_SHARED, window->shmid, 0);
if (mem == MAP_FAILED)
{ {
DEBUG_X11("xf_CreateDesktopWindow: failed to assign pointer to the memory address - " DEBUG_X11("%s: ftruncate failed with %s [%d]", __FUNCTION__, strerror(rc), rc);
"shmat()\n");
} }
else else
{ {
window->xfwin = mem; void* mem = mmap(0, sizeof(window->handle), PROT_READ | PROT_WRITE, MAP_SHARED,
*window->xfwin = window->handle; window->shmid, 0);
if (mem == MAP_FAILED)
{
DEBUG_X11(
"xf_CreateDesktopWindow: failed to assign pointer to the memory address - "
"shmat()\n");
}
else
{
window->xfwin = mem;
*window->xfwin = window->handle;
}
} }
} }

View File

@ -1144,7 +1144,6 @@ static int nla_server_authenticate(rdpNla* nla)
while (TRUE) while (TRUE)
{ {
int rc = -1;
SecBuffer inputBuffer = { 0 }; SecBuffer inputBuffer = { 0 };
SecBuffer outputBuffer = { 0 }; SecBuffer outputBuffer = { 0 };
SecBufferDesc inputBufferDesc = { 0 }; SecBufferDesc inputBufferDesc = { 0 };
@ -1219,6 +1218,8 @@ static int nla_server_authenticate(rdpNla* nla)
if (nla->status == SEC_E_OK) if (nla->status == SEC_E_OK)
{ {
int rc = -1;
if (outputBuffer.cbBuffer != 0) if (outputBuffer.cbBuffer != 0)
{ {
if (!nla_send(nla)) if (!nla_send(nla))
@ -2219,7 +2220,7 @@ int nla_recv_pdu(rdpNla* nla, wStream* s)
int nla_server_recv(rdpNla* nla) int nla_server_recv(rdpNla* nla)
{ {
int status; int status = -1;
wStream* s = nla_server_recv_stream(nla); wStream* s = nla_server_recv_stream(nla);
if (!s) if (!s)
goto fail; goto fail;

View File

@ -88,13 +88,10 @@ error:
static void client_to_proxy_context_free(freerdp_peer* client, rdpContext* ctx) static void client_to_proxy_context_free(freerdp_peer* client, rdpContext* ctx)
{ {
pServerContext* context = (pServerContext*)ctx; pServerContext* context = (pServerContext*)ctx;
proxyServer* server;
if (!client || !context) if (!client || !context)
return; return;
server = (proxyServer*)client->ContextExtra;
WTSCloseServer((HANDLE)context->vcm); WTSCloseServer((HANDLE)context->vcm);
if (context->dynvcReady) if (context->dynvcReady)