pc_serial: fix gcc4 warnings (hopefully)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user