Fixed signedness casts.
authorArmin Novak <armin.novak@thincast.com>
Wed, 24 Oct 2018 15:24:35 +0000 (17:24 +0200)
committerArmin Novak <armin.novak@thincast.com>
Thu, 25 Oct 2018 12:08:20 +0000 (14:08 +0200)
libfreerdp/core/gcc.c
libfreerdp/locale/keyboard_xkbfile.c

index 759468c..80a9faf 100644 (file)
@@ -1671,7 +1671,7 @@ BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
 
        if (blockLength != 8)
        {
-               if (Stream_GetRemainingLength(s) >= (blockLength - 8))
+               if (Stream_GetRemainingLength(s) >= (size_t)(blockLength - 8))
                {
                        /* The old Microsoft Mac RDP client can send a pad here */
                        Stream_Seek(s, (blockLength - 8));
@@ -1740,7 +1740,7 @@ BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs, UINT16 blockLength)
                monitorCount = settings->MonitorDefArraySize;
        }
 
-       if (((blockLength - 8)  / 20) < monitorCount)
+       if ((UINT32)((blockLength - 8)  / 20) < monitorCount)
                return FALSE;
 
        settings->MonitorCount = monitorCount;
index 9e3a19c..287f96d 100644 (file)
@@ -419,7 +419,7 @@ int detect_keyboard_layout_from_xkbfile(void* display, DWORD* keyboardLayoutId)
 
 int freerdp_keyboard_load_map_from_xkbfile(void* display, DWORD x11_keycode_to_rdp_scancode[256])
 {
-       int i, j;
+       size_t i, j;
        BOOL found;
        XkbDescPtr xkb;
        BOOL status = FALSE;