From 8ee781bf7b60186ca4e6ae8593ad85012d19d80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 29 Aug 2014 16:58:08 +0200 Subject: [PATCH] pc_serial: fix gcc4 warnings (hopefully) --- src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp index 7d0f1e7f81..852f4b7bc7 100644 --- a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp +++ b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp @@ -103,7 +103,7 @@ static const struct serial_support_descriptor sSupportedDevices[] = { // single function with all ports // only BAR 0 & 1 are UART // http://www.moschip.com/data/products/NM9835/Data%20Sheet_9835.pdf - { B_PCI_BUS, VN" 16550 Serial Port", sDefaultRates, NULL, { 8, 8, 8, ~0x3, 2, 0x000f }, + { B_PCI_BUS, VN" 16550 Serial Port", sDefaultRates, NULL, { 8, 8, 8, (uint8)~0x3, 2, 0x000f }, { PCI_simple_communications, PCI_serial, PCI_serial_16550, 0x9710, 0x9835, PCI_INVAL, PCI_INVAL } }, @@ -1009,13 +1009,13 @@ publish_devices() for (int32 i = 0; gDeviceNames[i]; i++) free(gDeviceNames[i]); - int32 j = 0; + int j = 0; acquire_sem(gDriverLock); - for(int32 i = 0; i < DEVICES_COUNT; i++) { + for(int i = 0; i < DEVICES_COUNT; i++) { if (gSerialDevices[i]) { gDeviceNames[j] = (char *)malloc(strlen(sDeviceBaseName) + 4); if (gDeviceNames[j]) { - sprintf(gDeviceNames[j], "%s%ld", sDeviceBaseName, i); + sprintf(gDeviceNames[j], "%s%d", sDeviceBaseName, i); j++; } else TRACE_ALWAYS("publish_devices - no memory to allocate device names\n");