Index: base/applications/atactl/atactl.cpp =================================================================== --- base/applications/atactl/atactl.cpp (revision 57082) +++ base/applications/atactl/atactl.cpp (working copy) @@ -225,7 +225,7 @@ ata_send_ioctl( HANDLE h, PSCSI_ADDRESS addr, - PCHAR Signature, + const CHAR *Signature, ULONG Ioctl, PVOID inBuffer, ULONG inBufferLength, @@ -537,7 +537,6 @@ PIDENTIFY_DATA ident; char buff[sizeof(SENDCMDOUTPARAMS)+/*sizeof(IDENTIFY_DATA)*/2048]; char mode_str[12]; - ULONG bus_id = (dev_id >> 24) & 0xff; BOOLEAN found = FALSE; SENDCMDINPARAMS pin; int io_mode = -1; @@ -546,7 +545,7 @@ char lun_str[10]; HKEY hKey2; ULONGLONG max_lba = -1; - USHORT chs[3]; + USHORT chs[3] = { 0 }; if(dev_id != -1) { dev_id &= 0x00ffffff; @@ -594,7 +593,7 @@ } else { mode_str[0] = 0; } - printf(" b%u [%s]\n", + printf(" b%lu [%s]\n", i, mode_str ); @@ -687,7 +686,7 @@ if(status) { if(!g_extended) { - printf(" b%u:d%d%s %24.24s %4.4s ", + printf(" b%lu:d%d%s %24.24s %4.4s ", i, inquiryData->TargetId, lun_str, @@ -696,7 +695,7 @@ (g_extended ? (PUCHAR)"" : &inquiryData->InquiryData[8+24]) ); } else { - printf(" b%u:d%d%s ", + printf(" b%lu:d%d%s ", i, inquiryData->TargetId, lun_str @@ -751,7 +750,7 @@ break; default: printf(" Hard Drive "); - print_geom = 1; + print_geom = TRUE; //MOV_DD_SWP(max_lba, ident->UserAddressableSectors); max_lba = ident->UserAddressableSectors; if(ident->FeaturesSupport.Address48) { @@ -794,25 +793,25 @@ printf(" C/H/S: %u/%u/%u \n", chs[0], chs[1], chs[2]); printf(" LBA: %I64u \n", max_lba); if(max_lba < 2) { - printf(" Size: %u kb\n", max_lba/2); + printf(" Size: %I64u kb\n", max_lba/2); } else if(max_lba < 2*1024*1024) { - printf(" Size: %u Mb\n", max_lba/2048); + printf(" Size: %I64u Mb\n", max_lba/2048); } else if(max_lba < (ULONG)2*1024*1024*1024) { - printf(" Size: %u.%u (%u) Gb\n", (ULONG)(max_lba/2048/1024), + printf(" Size: %lu.%lu (%lu) Gb\n", (ULONG)(max_lba/2048/1024), (ULONG)(((max_lba/2048)%1024)/10), (ULONG)(max_lba*512/1000/1000/1000) ); } else { - printf(" Size: %u.%u (%u) Tb\n", (ULONG)(max_lba/2048/1024/1024), + printf(" Size: %lu.%lu (%lu) Tb\n", (ULONG)(max_lba/2048/1024/1024), (ULONG)((max_lba/2048/1024)%1024)/10, (ULONG)(max_lba*512/1000/1000/1000) ); } } len = 0; - if(hKey2 = ata_get_bblist_regh(ident, DevSerial, TRUE)) { + if((hKey2 = ata_get_bblist_regh(ident, DevSerial, TRUE))) { if(RegQueryValueEx(hKey2, DevSerial, NULL, NULL, NULL, &len) == ERROR_SUCCESS) { printf(" !!! Assigned bad-block list !!!\n"); } @@ -887,7 +886,7 @@ } else { if(AdapterInfo->AdapterInterfaceType == PCIBus) { slotData.u.AsULONG = AdapterInfo->slotNumber; - printf(" PCI Bus/Dev/Func: %u/%u/%u%s\n", + printf(" PCI Bus/Dev/Func: %lu/%lu/%lu%s\n", AdapterInfo->SystemIoBusNumber, slotData.u.bits.DeviceNumber, slotData.u.bits.FunctionNumber, AdapterInfo->AdapterInterfaceType == AdapterInfo->OrigAdapterInterfaceType ? "" : " (ISA-Bridged)"); printf(" VendorId/DevId/Rev: %#04x/%#04x/%#02x\n", @@ -901,7 +900,7 @@ if(AdapterInfo->AdapterInterfaceType == Isa) { printf(" ISA Bus\n"); } - printf(" IRQ: %d\n", AdapterInfo->BusInterruptLevel); + printf(" IRQ: %ld\n", AdapterInfo->BusInterruptLevel); } } ata_close_dev(h); @@ -1261,7 +1260,7 @@ } len = GetFileSize(hf, NULL); - if(!len || len == -1) + if(!len || len == INVALID_FILE_SIZE) goto exit; bblist = (char*)GlobalAlloc(GMEM_FIXED, len*8); } @@ -1310,7 +1309,7 @@ j++; BB_Msg[sizeof(BB_Msg)-1] = 0; k=0; - while(a = BB_Msg[k]) { + while((a = BB_Msg[k])) { if(a == ' ' || a == '\t' || a == '\r') { k++; continue; @@ -1329,7 +1328,7 @@ continue; } k0 = k; - while(a = BB_Msg[k]) { + while((a = BB_Msg[k])) { if(a == ' ' || a == '\t' || a == '\r') { BB_Msg[k] = '\t'; } @@ -1496,7 +1495,6 @@ char* argv[] ) { - ULONG Flags = 0; int i, j; char a; int bus_id = -1; @@ -1516,7 +1514,7 @@ if(!argv[i]) continue; if((a = argv[i][0]) != '-') { - for(j=0; a = argv[i][j]; j++) { + for(j=0; (a = argv[i][j]); j++) { switch(a) { case 'a' : case 's' : Index: drivers/storage/ide/uniata/bm_devs.h =================================================================== --- drivers/storage/ide/uniata/bm_devs.h (revision 57082) +++ drivers/storage/ide/uniata/bm_devs.h (working copy) @@ -50,22 +50,16 @@ #ifndef __IDE_BUSMASTER_DEVICES_H__ #define __IDE_BUSMASTER_DEVICES_H__ -#ifdef USER_MODE -#define PVEN_STR PCSTR -#else // USER_MODE -#define PVEN_STR PCHAR -#endif // USER_MODE - typedef struct _BUSMASTER_CONTROLLER_INFORMATION { - PVEN_STR VendorId; + PCSTR VendorId; ULONG VendorIdLength; ULONG nVendorId; - PVEN_STR DeviceId; + PCSTR DeviceId; ULONG DeviceIdLength; ULONG nDeviceId; ULONG nRevId; ULONG MaxTransferMode; - PCHAR FullDevName; + PCSTR FullDevName; ULONG RaidFlags; CHAR VendorIdStr[4]; CHAR DeviceIdStr[4]; @@ -84,7 +78,7 @@ ULONG Isr2Vector; PKINTERRUPT Isr2InterruptObject; CHAR AltInitMasterDev; // 0xff - uninitialized, 0x00 - normal, 0x01 - change ISA to PCI - CHAR NeedAltInit; // 0x01 - try change ISA to PCI + CHAR NeedAltInit; // 0x01 - try change ISA to PCI #endif }BUSMASTER_CONTROLLER_INFORMATION, *PBUSMASTER_CONTROLLER_INFORMATION; @@ -660,10 +654,10 @@ #ifdef USER_MODE #define PCI_DEV_HW_SPEC_BM(idhi, idlo, rev, mode, name, flags) \ - { (PVEN_STR) #idlo, 4, 0x##idlo, (PVEN_STR) #idhi, 4, 0x##idhi, rev, mode, name, flags} + { #idlo, 4, 0x##idlo, #idhi, 4, 0x##idhi, rev, mode, name, flags} #else #define PCI_DEV_HW_SPEC_BM(idhi, idlo, rev, mode, name, flags) \ - { (PVEN_STR) #idlo, 4, 0x##idlo, (PVEN_STR) #idhi, 4, 0x##idhi, rev, mode, NULL, flags} + { #idlo, 4, 0x##idlo, #idhi, 4, 0x##idhi, rev, mode, NULL, flags} #endif #define BMLIST_TERMINATOR (0xffffffffL) Index: drivers/storage/ide/uniata/id_ata.cpp =================================================================== --- drivers/storage/ide/uniata/id_ata.cpp (revision 57082) +++ drivers/storage/ide/uniata/id_ata.cpp (working copy) @@ -9793,9 +9793,9 @@ hwInitializationData.comm.NumberOfAccessRanges = 6; hwInitializationData.comm.AdapterInterfaceType = PCIBus; - hwInitializationData.comm.VendorId = BMList[i].VendorId; + hwInitializationData.comm.VendorId = (PVOID) BMList[i].VendorId; hwInitializationData.comm.VendorIdLength = (USHORT) BMList[i].VendorIdLength; - hwInitializationData.comm.DeviceId = BMList[i].DeviceId; + hwInitializationData.comm.DeviceId = (PVOID) BMList[i].DeviceId; hwInitializationData.comm.DeviceIdLength = (USHORT) BMList[i].DeviceIdLength; BMList[i].channel = 0/*(UCHAR)c*/;