Skip to content

Commit

Permalink
serial: attempt to avoid a couple compilation warnings: Warning:int-t…
Browse files Browse the repository at this point in the history
…o-pointer-cast
  • Loading branch information
eledoux committed Jul 3, 2014
1 parent e4840d3 commit d1a7e8c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions channels/serial/client/serial_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
#endif

#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#ifdef HAVE_SYS_MODEM_H
#include <sys/modem.h>
Expand Down Expand Up @@ -470,6 +471,7 @@ static void create_irp_thread(SERIAL_DEVICE *serial, IRP *irp)
IRP_THREAD_DATA *data = NULL;
HANDLE irpThread = INVALID_HANDLE_VALUE;
HANDLE previousIrpThread;
uintptr_t key;

/* for a test/debug purpose, uncomment the code below to get a
* single thread for all IRPs. NB: two IRPs could not be
Expand Down Expand Up @@ -547,7 +549,8 @@ static void create_irp_thread(SERIAL_DEVICE *serial, IRP *irp)
* observed with FreeRDP).
*/

previousIrpThread = ListDictionary_GetItemValue(serial->IrpThreads, (void*)irp->CompletionId);
key = irp->CompletionId;
previousIrpThread = ListDictionary_GetItemValue(serial->IrpThreads, (void*)key);
if (previousIrpThread)
{
/* Thread still alived <=> Request still pending */
Expand Down Expand Up @@ -618,8 +621,8 @@ static void create_irp_thread(SERIAL_DEVICE *serial, IRP *irp)
}



ListDictionary_Add(serial->IrpThreads, (void*)irp->CompletionId, irpThread);
key = irp->CompletionId;
ListDictionary_Add(serial->IrpThreads, (void*)key, irpThread);

return;

Expand Down

0 comments on commit d1a7e8c

Please sign in to comment.