mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
fixed some signed/unsigned comparison warnings with -Wsign-compare
svn path=/trunk/; revision=16441
This commit is contained in:
parent
c3e6b1f6a4
commit
cc6ffdce48
141 changed files with 1406 additions and 1423 deletions
|
@ -53,7 +53,8 @@ VOID Usage(VOID);
|
|||
/* FIXME: allow user to specify an interface address, via pszIfAddr */
|
||||
INT DisplayArpEntries(PTCHAR pszInetAddr, PTCHAR pszIfAddr)
|
||||
{
|
||||
INT i, k, iRet;
|
||||
INT iRet;
|
||||
UINT i, k;
|
||||
PMIB_IPNETTABLE pIpNetTable;
|
||||
PMIB_IPADDRTABLE pIpAddrTable;
|
||||
ULONG ulSize = 0;
|
||||
|
|
|
@ -59,7 +59,7 @@ netfinger(char *name)
|
|||
return;
|
||||
|
||||
*host++ = '\0';
|
||||
if (isdigit(*host) && (defaddr.s_addr = inet_addr(host)) != -1) {
|
||||
if (isdigit(*host) && (defaddr.s_addr = inet_addr(host)) != (unsigned long)-1) {
|
||||
def.h_name = host;
|
||||
def.h_addr_list = alist;
|
||||
def.h_addr = (char *)&defaddr;
|
||||
|
|
|
@ -100,7 +100,7 @@ int fgetcSocket(int s)
|
|||
index = 0;
|
||||
total = recv(s, buffer, sizeof(buffer), 0);
|
||||
|
||||
if (total == INVALID_SOCKET)
|
||||
if (total == SOCKET_ERROR)
|
||||
{
|
||||
total = 0;
|
||||
return ERROR;
|
||||
|
|
|
@ -119,7 +119,7 @@ char *hookup(char *host, int port)
|
|||
|
||||
bzero((char *)&hisctladdr, sizeof (hisctladdr));
|
||||
hisctladdr.sin_addr.s_addr = inet_addr(host);
|
||||
if (hisctladdr.sin_addr.s_addr != -1) {
|
||||
if (hisctladdr.sin_addr.s_addr != (unsigned long)-1) {
|
||||
hisctladdr.sin_family = AF_INET;
|
||||
(void) strncpy(hostnamebuf, host, sizeof(hostnamebuf));
|
||||
} else {
|
||||
|
|
|
@ -36,7 +36,7 @@ int print_routes() {
|
|||
DWORD Error;
|
||||
ULONG Size = 0;
|
||||
char Destination[IPBUF], Gateway[IPBUF], Netmask[IPBUF];
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if( (Error = GetIpForwardTable( NULL, &Size, TRUE )) ==
|
||||
ERROR_INSUFFICIENT_BUFFER ) {
|
||||
|
|
|
@ -213,7 +213,7 @@ int main()
|
|||
unsigned char minute, minute1, tmin, tmin1;
|
||||
unsigned char seconds, seconds1, tsec, tsec1;
|
||||
|
||||
int ti;
|
||||
unsigned int ti;
|
||||
LARGE_INTEGER ptime;
|
||||
|
||||
ptime.QuadPart = CurrentProcess->KernelTime.QuadPart;
|
||||
|
|
|
@ -36,7 +36,7 @@ FillSmallProc(void *Context, PPERF_INFO PerfInfo, unsigned Reps)
|
|||
{
|
||||
#define SMALL_SIZE 16
|
||||
unsigned Rep;
|
||||
unsigned x, y;
|
||||
int x, y;
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
|
|
|
@ -60,7 +60,7 @@ void
|
|||
LinesHorizontalProc(void *Context, PPERF_INFO PerfInfo, unsigned Reps)
|
||||
{
|
||||
unsigned Rep;
|
||||
unsigned y;
|
||||
int y;
|
||||
HDC Dc;
|
||||
|
||||
for (Rep = 0; Rep < Reps; )
|
||||
|
@ -79,7 +79,7 @@ void
|
|||
LinesVerticalProc(void *Context, PPERF_INFO PerfInfo, unsigned Reps)
|
||||
{
|
||||
unsigned Rep;
|
||||
unsigned x;
|
||||
int x;
|
||||
HDC Dc;
|
||||
|
||||
for (Rep = 0; Rep < Reps; )
|
||||
|
|
|
@ -28,8 +28,8 @@ typedef struct tagPERF_INFO
|
|||
COLORREF BackgroundColor;
|
||||
HDC ForegroundDc;
|
||||
HDC BackgroundDc;
|
||||
ULONG WndWidth;
|
||||
ULONG WndHeight;
|
||||
INT WndWidth;
|
||||
INT WndHeight;
|
||||
} PERF_INFO, *PPERF_INFO;
|
||||
|
||||
typedef unsigned (*INITTESTPROC)(void **Context, PPERF_INFO PerfInfo, unsigned Reps);
|
||||
|
|
|
@ -192,7 +192,7 @@ FILE* Ext2OpenFile(PCHAR FileName)
|
|||
*/
|
||||
BOOL Ext2LookupFile(PCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer)
|
||||
{
|
||||
int i;
|
||||
UINT i;
|
||||
ULONG NumberOfPathParts;
|
||||
CHAR PathPart[261];
|
||||
PVOID DirectoryBuffer;
|
||||
|
|
|
@ -689,7 +689,7 @@ BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize
|
|||
*/
|
||||
BOOL FatLookupFile(PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer)
|
||||
{
|
||||
int i;
|
||||
UINT i;
|
||||
ULONG NumberOfPathParts;
|
||||
CHAR PathPart[261];
|
||||
PVOID DirectoryBuffer;
|
||||
|
@ -827,9 +827,9 @@ void FatParseShortFileName(PCHAR Buffer, PDIRENTRY DirEntry)
|
|||
BOOL FatGetFatEntry(ULONG Cluster, ULONG* ClusterPointer)
|
||||
{
|
||||
ULONG fat = 0;
|
||||
int FatOffset;
|
||||
int ThisFatSecNum;
|
||||
int ThisFatEntOffset;
|
||||
UINT FatOffset;
|
||||
UINT ThisFatSecNum;
|
||||
UINT ThisFatEntOffset;
|
||||
|
||||
DbgPrint((DPRINT_FILESYSTEM, "FatGetFatEntry() Retrieving FAT entry for cluster %d.\n", Cluster));
|
||||
|
||||
|
|
|
@ -339,10 +339,10 @@ BOOL FsIsEndOfFile(PFILE FileHandle)
|
|||
*/
|
||||
ULONG FsGetNumPathParts(PCHAR Path)
|
||||
{
|
||||
ULONG i;
|
||||
size_t i;
|
||||
ULONG num;
|
||||
|
||||
for (i=0,num=0; i<(int)strlen(Path); i++)
|
||||
for (i=0,num=0; i<strlen(Path); i++)
|
||||
{
|
||||
if ((Path[i] == '\\') || (Path[i] == '/'))
|
||||
{
|
||||
|
@ -364,12 +364,12 @@ ULONG FsGetNumPathParts(PCHAR Path)
|
|||
*/
|
||||
VOID FsGetFirstNameFromPath(PCHAR Buffer, PCHAR Path)
|
||||
{
|
||||
ULONG i;
|
||||
size_t i;
|
||||
|
||||
// Copy all the characters up to the end of the
|
||||
// string or until we hit a '\' character
|
||||
// and put them in Buffer
|
||||
for (i=0; i<(int)strlen(Path); i++)
|
||||
for (i=0; i<strlen(Path); i++)
|
||||
{
|
||||
if ((Path[i] == '\\') || (Path[i] == '/'))
|
||||
{
|
||||
|
|
|
@ -182,7 +182,7 @@ static PVOID IsoBufferDirectory(ULONG DirectoryStartSector, ULONG DirectoryLengt
|
|||
*/
|
||||
static BOOL IsoLookupFile(PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
|
||||
{
|
||||
int i;
|
||||
UINT i;
|
||||
ULONG NumberOfPathParts;
|
||||
CHAR PathPart[261];
|
||||
PVOID DirectoryBuffer;
|
||||
|
|
|
@ -168,7 +168,7 @@ BOOL NtfsDiskRead(ULONGLONG Offset, ULONGLONG Length, PCHAR Buffer)
|
|||
}
|
||||
|
||||
/* II. Read all complete 64-sector blocks. */
|
||||
while (Length >= 64 * NtfsBootSector->BytesPerSector)
|
||||
while (Length >= (ULONGLONG)64 * (ULONGLONG)NtfsBootSector->BytesPerSector)
|
||||
{
|
||||
if (!MachDiskReadLogicalSectors(NtfsDriveNumber, NtfsSectorOfClusterZero + (Offset / NtfsBootSector->BytesPerSector), 64, (PCHAR)DISKREADBUFFER))
|
||||
return FALSE;
|
||||
|
|
|
@ -56,7 +56,7 @@ typedef struct _INFCACHELINE
|
|||
struct _INFCACHELINE *Next;
|
||||
struct _INFCACHELINE *Prev;
|
||||
|
||||
LONG FieldCount;
|
||||
ULONG FieldCount;
|
||||
|
||||
PCHAR Key;
|
||||
|
||||
|
@ -437,7 +437,7 @@ inline static int is_eol( struct parser *parser, const CHAR *ptr )
|
|||
/* push data from current token start up to pos into the current token */
|
||||
static int push_token( struct parser *parser, const CHAR *pos )
|
||||
{
|
||||
int len = pos - parser->start;
|
||||
unsigned int len = pos - parser->start;
|
||||
const CHAR *src = parser->start;
|
||||
CHAR *dst = parser->token + parser->token_len;
|
||||
|
||||
|
|
|
@ -384,8 +384,8 @@ ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount
|
|||
|
||||
VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount)
|
||||
{
|
||||
int Index;
|
||||
int Index2;
|
||||
UINT Index;
|
||||
UINT Index2;
|
||||
|
||||
// Loop through each entry in the array
|
||||
for (Index=0; Index<*MapCount; Index++)
|
||||
|
|
|
@ -528,7 +528,7 @@ FrLdrMapKernel(FILE *KernelImage)
|
|||
ULONG_PTR SourceSection;
|
||||
ULONG_PTR TargetSection;
|
||||
ULONG SectionSize;
|
||||
LONG i;
|
||||
INT i;
|
||||
PIMAGE_DATA_DIRECTORY RelocationDDir;
|
||||
PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd;
|
||||
ULONG Count;
|
||||
|
@ -588,7 +588,7 @@ FrLdrMapKernel(FILE *KernelImage)
|
|||
Section += SectionCount;
|
||||
|
||||
/* Walk each section backwards */
|
||||
for (i=SectionCount; i >= 0; i--, Section--) {
|
||||
for (i=(INT)SectionCount; i >= 0; i--, Section--) {
|
||||
|
||||
/* Get the disk location and the memory location, and the size */
|
||||
SourceSection = RaToPa(Section->PointerToRawData);
|
||||
|
@ -636,7 +636,7 @@ FrLdrMapKernel(FILE *KernelImage)
|
|||
/* Calculate the Offset of the Type */
|
||||
TypeOffset = (PUSHORT)(RelocationDir + 1);
|
||||
|
||||
for (i = 0; i < Count; i++) {
|
||||
for (i = 0; i < (INT)Count; i++) {
|
||||
|
||||
ShortPtr = (PUSHORT)(Address + (*TypeOffset & 0xFFF));
|
||||
|
||||
|
@ -765,7 +765,7 @@ FrLdrCloseModule(ULONG_PTR ModuleBase,
|
|||
if (ModuleData) {
|
||||
|
||||
/* Make sure this is the right module and that it hasn't been closed */
|
||||
if ((ModuleBase == ModuleData->ModuleStart) && (ModuleData->ModuleEnd == -1)) {
|
||||
if ((ModuleBase == ModuleData->ModuleStart) && (ModuleData->ModuleEnd == (ULONG_PTR)-1)) {
|
||||
|
||||
/* Close the Module */
|
||||
ModuleData->ModuleEnd = ModuleData->ModuleStart + ModuleSize;
|
||||
|
|
|
@ -1360,10 +1360,10 @@ RegImportValue (PHBIN RootBin,
|
|||
PWCHAR wName;
|
||||
PCHAR cName;
|
||||
LONG Error;
|
||||
LONG DataSize;
|
||||
ULONG DataSize;
|
||||
PCHAR cBuffer;
|
||||
PWCHAR wBuffer;
|
||||
LONG i;
|
||||
ULONG i;
|
||||
|
||||
if (ValueCell->CellSize >= 0 || ValueCell->Id != REG_VALUE_CELL_ID)
|
||||
{
|
||||
|
|
|
@ -558,7 +558,7 @@ LoadAndBootReactOS(PCHAR OperatingSystemName)
|
|||
CHAR szHalName[1024];
|
||||
CHAR szFileName[1024];
|
||||
CHAR szBootPath[256];
|
||||
INT i;
|
||||
UINT i;
|
||||
CHAR MsgBuffer[256];
|
||||
ULONG SectionId;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ VOID RunLoader(VOID)
|
|||
ULONG Size;
|
||||
char *SourcePath;
|
||||
char *LoadOptions;
|
||||
int i;
|
||||
UINT i;
|
||||
|
||||
HINF InfHandle;
|
||||
ULONG ErrorLine;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
void print(char *str)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < strlen(str); i++)
|
||||
MachConsPutChar(str[i]);
|
||||
|
|
|
@ -517,9 +517,10 @@ VOID TuiMessageBox(PCHAR MessageText)
|
|||
VOID TuiMessageBoxCritical(PCHAR MessageText)
|
||||
{
|
||||
int width = 8;
|
||||
int height = 1;
|
||||
unsigned int height = 1;
|
||||
int curline = 0;
|
||||
int i , j, k;
|
||||
int k;
|
||||
size_t i , j;
|
||||
int x1, x2, y1, y2;
|
||||
char temp[260];
|
||||
char key;
|
||||
|
@ -768,16 +769,17 @@ VOID TuiFadeOut(VOID)
|
|||
BOOL TuiEditBox(PCHAR MessageText, PCHAR EditTextBuffer, ULONG Length)
|
||||
{
|
||||
int width = 8;
|
||||
int height = 1;
|
||||
unsigned int height = 1;
|
||||
int curline = 0;
|
||||
int i , j, k;
|
||||
int k;
|
||||
size_t i , j;
|
||||
int x1, x2, y1, y2;
|
||||
char temp[260];
|
||||
char key;
|
||||
int EditBoxLine;
|
||||
int EditBoxStartX, EditBoxEndX;
|
||||
ULONG EditBoxStartX, EditBoxEndX;
|
||||
int EditBoxCursorX;
|
||||
int EditBoxTextCount;
|
||||
unsigned int EditBoxTextCount;
|
||||
int EditBoxTextDisplayIndex;
|
||||
BOOL ReturnCode;
|
||||
PVOID ScreenBuffer;
|
||||
|
|
|
@ -165,7 +165,8 @@ ScrWrite(PDEVICE_OBJECT DeviceObject,
|
|||
NTSTATUS Status;
|
||||
char *pch = Irp->UserBuffer;
|
||||
PBYTE vidmem;
|
||||
int i, j, offset;
|
||||
unsigned int i;
|
||||
int j, offset;
|
||||
int cursorx, cursory;
|
||||
int rows, columns;
|
||||
int processed = DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT;
|
||||
|
|
|
@ -158,7 +158,7 @@ vgaPreCalc()
|
|||
STATIC VOID FASTCALL
|
||||
vgaSetRegisters(PVGA_REGISTERS Registers)
|
||||
{
|
||||
int i;
|
||||
UINT i;
|
||||
|
||||
/* Update misc output register */
|
||||
WRITE_PORT_UCHAR(MISC, Registers->Misc);
|
||||
|
|
|
@ -80,7 +80,7 @@ Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
{
|
||||
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
NTSTATUS status;
|
||||
int i;
|
||||
UINT i;
|
||||
|
||||
switch (Stack->MajorFunction)
|
||||
{
|
||||
|
|
|
@ -280,7 +280,7 @@ NtfsDumpFileAttributes (PFILE_RECORD_HEADER FileRecord)
|
|||
|
||||
Attribute = (PATTRIBUTE)((ULONG_PTR)FileRecord + FileRecord->AttributeOffset);
|
||||
while (Attribute < (PATTRIBUTE)((ULONG_PTR)FileRecord + FileRecord->BytesInUse) &&
|
||||
Attribute->AttributeType != -1)
|
||||
Attribute->AttributeType != (ATTRIBUTE_TYPE)-1)
|
||||
{
|
||||
NtfsDumpAttribute (Attribute);
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ FindAttribute (PFILE_RECORD_HEADER FileRecord,
|
|||
|
||||
Attribute = (PATTRIBUTE)((ULONG_PTR)FileRecord + FileRecord->AttributeOffset);
|
||||
while (Attribute < (PATTRIBUTE)((ULONG_PTR)FileRecord + FileRecord->BytesInUse) &&
|
||||
Attribute->AttributeType != -1)
|
||||
Attribute->AttributeType != (ATTRIBUTE_TYPE)-1)
|
||||
{
|
||||
if (Attribute->AttributeType == Type)
|
||||
{
|
||||
|
|
|
@ -831,7 +831,7 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
|
|||
|
||||
ByteOffset = IrpContext->Stack->Parameters.Write.ByteOffset;
|
||||
if (ByteOffset.u.LowPart == FILE_WRITE_TO_END_OF_FILE &&
|
||||
ByteOffset.u.HighPart == 0xffffffff)
|
||||
ByteOffset.u.HighPart == -1)
|
||||
{
|
||||
ByteOffset.QuadPart = Fcb->RFCB.FileSize.QuadPart;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ VOID RemoveSelect( PAFD_ACTIVE_POLL Poll ) {
|
|||
|
||||
VOID SignalSocket( PAFD_ACTIVE_POLL Poll, PAFD_POLL_INFO PollReq,
|
||||
NTSTATUS Status ) {
|
||||
int i;
|
||||
UINT i;
|
||||
PIRP Irp = Poll->Irp;
|
||||
AFD_DbgPrint(MID_TRACE,("Called (Status %x)\n", Status));
|
||||
KeCancelTimer( &Poll->Timer );
|
||||
|
@ -121,7 +121,7 @@ VOID KillSelectsForFCB( PAFD_DEVICE_EXTENSION DeviceExt,
|
|||
PIRP Irp;
|
||||
PAFD_POLL_INFO PollReq;
|
||||
PAFD_HANDLE HandleArray;
|
||||
int i;
|
||||
UINT i;
|
||||
|
||||
AFD_DbgPrint(MID_TRACE,("Killing selects that refer to %x\n", FileObject));
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ __inline ULONG SkipToOffset(
|
|||
for (;;) {
|
||||
|
||||
if (!Buffer)
|
||||
return -1;
|
||||
return 0xFFFFFFFF;
|
||||
|
||||
NdisQueryBuffer(Buffer, (PVOID)Data, Size);
|
||||
|
||||
|
@ -77,7 +77,7 @@ UINT CopyBufferToBufferChain(
|
|||
NDIS_DbgPrint(MAX_TRACE, ("DstBuffer (0x%X) DstOffset (0x%X) SrcData (0x%X) Length (%d)\n", DstBuffer, DstOffset, SrcData, Length));
|
||||
|
||||
/* Skip DstOffset bytes in the destination buffer chain */
|
||||
if (SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == -1)
|
||||
if (SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
||||
return 0;
|
||||
|
||||
/* Start copying the data */
|
||||
|
@ -134,7 +134,7 @@ UINT CopyBufferChainToBuffer(
|
|||
NDIS_DbgPrint(MAX_TRACE, ("DstData 0x%X SrcBuffer 0x%X SrcOffset 0x%X Length %d\n",DstData,SrcBuffer, SrcOffset, Length));
|
||||
|
||||
/* Skip SrcOffset bytes in the source buffer chain */
|
||||
if (SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == -1)
|
||||
if (SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
||||
return 0;
|
||||
|
||||
/* Start copying the data */
|
||||
|
@ -234,11 +234,11 @@ UINT CopyPacketToBufferChain(
|
|||
|
||||
/* Skip DstOffset bytes in the destination buffer chain */
|
||||
NdisQueryBuffer(DstBuffer, (PVOID)&DstData, &DstSize);
|
||||
if (SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == -1)
|
||||
if (SkipToOffset(DstBuffer, DstOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
||||
return 0;
|
||||
/* Skip SrcOffset bytes in the source packet */
|
||||
NdisGetFirstBufferFromPacket(SrcPacket, &SrcBuffer, (PVOID)&SrcData, &SrcSize, &Total);
|
||||
if (SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == -1)
|
||||
if (SkipToOffset(SrcBuffer, SrcOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
||||
return 0;
|
||||
/* Copy the data */
|
||||
for (Total = 0;;) {
|
||||
|
@ -669,12 +669,12 @@ NdisCopyFromPacketToPacket(
|
|||
|
||||
/* Skip DestinationOffset bytes in the destination packet */
|
||||
NdisGetFirstBufferFromPacket(Destination, &DstBuffer, (PVOID)&DstData, &DstSize, &Total);
|
||||
if (SkipToOffset(DstBuffer, DestinationOffset, &DstData, &DstSize) == -1)
|
||||
if (SkipToOffset(DstBuffer, DestinationOffset, &DstData, &DstSize) == 0xFFFFFFFF)
|
||||
return;
|
||||
|
||||
/* Skip SourceOffset bytes in the source packet */
|
||||
NdisGetFirstBufferFromPacket(Source, &SrcBuffer, (PVOID)&SrcData, &SrcSize, &Total);
|
||||
if (SkipToOffset(SrcBuffer, SourceOffset, &SrcData, &SrcSize) == -1)
|
||||
if (SkipToOffset(SrcBuffer, SourceOffset, &SrcData, &SrcSize) == 0xFFFFFFFF)
|
||||
return;
|
||||
|
||||
/* Copy the data */
|
||||
|
|
|
@ -1395,7 +1395,7 @@ NdisIPnPStartDevice(
|
|||
Status = IoGetDeviceProperty(Adapter->NdisMiniportBlock.PhysicalDeviceObject,
|
||||
DevicePropertyLegacyBusType, Size,
|
||||
&Adapter->NdisMiniportBlock.BusType, &Size);
|
||||
if (!NT_SUCCESS(Status) || Adapter->NdisMiniportBlock.BusType == -1)
|
||||
if (!NT_SUCCESS(Status) || Adapter->NdisMiniportBlock.BusType == (NDIS_INTERFACE_TYPE)-1)
|
||||
{
|
||||
NdisInitUnicodeString(&ParamName, L"BusType");
|
||||
NdisReadConfiguration(&NdisStatus, &ConfigParam, ConfigHandle,
|
||||
|
@ -1409,7 +1409,7 @@ NdisIPnPStartDevice(
|
|||
Status = IoGetDeviceProperty(Adapter->NdisMiniportBlock.PhysicalDeviceObject,
|
||||
DevicePropertyBusNumber, Size,
|
||||
&Adapter->NdisMiniportBlock.BusNumber, &Size);
|
||||
if (!NT_SUCCESS(Status) || Adapter->NdisMiniportBlock.BusNumber == -1)
|
||||
if (!NT_SUCCESS(Status) || Adapter->NdisMiniportBlock.BusNumber == (NDIS_INTERFACE_TYPE)-1)
|
||||
{
|
||||
NdisInitUnicodeString(&ParamName, L"BusNumber");
|
||||
NdisReadConfiguration(&NdisStatus, &ConfigParam, ConfigHandle,
|
||||
|
@ -1424,7 +1424,7 @@ NdisIPnPStartDevice(
|
|||
Status = IoGetDeviceProperty(Adapter->NdisMiniportBlock.PhysicalDeviceObject,
|
||||
DevicePropertyAddress, Size,
|
||||
&Adapter->NdisMiniportBlock.SlotNumber, &Size);
|
||||
if (!NT_SUCCESS(Status) || Adapter->NdisMiniportBlock.SlotNumber == -1)
|
||||
if (!NT_SUCCESS(Status) || Adapter->NdisMiniportBlock.SlotNumber == (NDIS_INTERFACE_TYPE)-1)
|
||||
{
|
||||
NdisInitUnicodeString(&ParamName, L"SlotNumber");
|
||||
NdisReadConfiguration(&NdisStatus, &ConfigParam, ConfigHandle,
|
||||
|
|
|
@ -437,7 +437,7 @@ NDIS_STATUS STDCALL NPF_tap (IN NDIS_HANDLE ProtocolBindingContext,IN NDIS_HANDL
|
|||
return NDIS_STATUS_NOT_ACCEPTED;
|
||||
|
||||
//if the filter returns -1 the whole packet must be accepted
|
||||
if(fres==-1 || fres > PacketSize+HeaderBufferSize)fres=PacketSize+HeaderBufferSize;
|
||||
if(fres==(UINT)-1 || fres > PacketSize+HeaderBufferSize)fres=PacketSize+HeaderBufferSize;
|
||||
|
||||
if(Open->mode & MODE_STAT){
|
||||
// we are in statistics mode
|
||||
|
|
|
@ -906,7 +906,7 @@ bpf_validate(f, len,mem_ex_size)
|
|||
IF_LOUD(DbgPrint("Validating program");)
|
||||
|
||||
flag=0;
|
||||
for(j=0;j<VALID_INSTRUCTIONS_LEN;j++)
|
||||
for(j=0;j<(int32)VALID_INSTRUCTIONS_LEN;j++)
|
||||
if (p->code==valid_instructions[j])
|
||||
flag=1;
|
||||
if (flag==0)
|
||||
|
|
|
@ -384,7 +384,7 @@ DiskClassCheckReadWrite(IN PDEVICE_OBJECT DeviceObject,
|
|||
PDEVICE_EXTENSION DeviceExtension;
|
||||
PDISK_DATA DiskData;
|
||||
PIO_STACK_LOCATION IrpStack;
|
||||
ULARGE_INTEGER EndingOffset;
|
||||
LARGE_INTEGER EndingOffset;
|
||||
|
||||
DPRINT("DiskClassCheckReadWrite() called\n");
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
|
|||
{
|
||||
int actual;
|
||||
actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath);
|
||||
return (actual >= size) ? -1 : actual;
|
||||
return (actual >= (int)size) ? -1 : actual;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
|
|
@ -174,11 +174,11 @@ VGADDI_BltBrush(SURFOBJ* Dest, SURFOBJ* Source, SURFOBJ* MaskSurf,
|
|||
BRUSHOBJ* Brush, POINTL* BrushPoint, ROP4 Rop4)
|
||||
{
|
||||
UCHAR SolidColor = 0;
|
||||
ULONG Left;
|
||||
ULONG Length;
|
||||
LONG Left;
|
||||
LONG Length;
|
||||
PUCHAR Video;
|
||||
UCHAR Mask;
|
||||
ULONG i, j;
|
||||
INT i, j;
|
||||
ULONG RasterOp = VGA_NORMAL;
|
||||
|
||||
/* Punt brush blts to non-device surfaces. */
|
||||
|
|
|
@ -301,7 +301,8 @@ DrvLineTo(SURFOBJ *DestObj,
|
|||
RECTL *RectBounds,
|
||||
MIX mix)
|
||||
{
|
||||
LONG x, y, deltax, deltay, i, xchange, ychange, hx, vy;
|
||||
LONG x, y, deltax, deltay, xchange, ychange, hx, vy;
|
||||
ULONG i;
|
||||
ULONG Pixel = Brush->iSolidColor;
|
||||
RECT_ENUM RectEnum;
|
||||
BOOL EnumMore;
|
||||
|
@ -342,7 +343,7 @@ DrvLineTo(SURFOBJ *DestObj,
|
|||
CLIPOBJ_cEnumStart(Clip, FALSE, CT_RECTANGLES, CD_RIGHTDOWN, 0);
|
||||
do
|
||||
{
|
||||
EnumMore = CLIPOBJ_bEnum(Clip, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
|
||||
EnumMore = CLIPOBJ_bEnum(Clip, sizeof(RectEnum), (PVOID) &RectEnum);
|
||||
for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= y1; i++)
|
||||
{
|
||||
if (y1 < RectEnum.arcl[i].bottom &&
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
|
||||
{
|
||||
int x, y, x2, y2, w, h;
|
||||
ULONG offset, j, pre1;
|
||||
int x, y, x2, y2, w, h, j;
|
||||
ULONG offset, pre1;
|
||||
ULONG orgpre1, orgx, midpre1, tmppre1;
|
||||
ULONG ileftpix, imidpix, irightpix;
|
||||
int ileftpix, imidpix, irightpix;
|
||||
/* double leftpix, midpix, rightpix;*/
|
||||
UCHAR a;
|
||||
|
||||
|
@ -150,7 +150,7 @@ BOOL VGADDIPaintRgn(SURFOBJ *Surface, CLIPOBJ *ClipRegion, ULONG iColor, MIX Mix
|
|||
CLIPOBJ_cEnumStart(ClipRegion, FALSE, CT_RECTANGLES, CD_ANY, 0);
|
||||
|
||||
do {
|
||||
int i;
|
||||
UINT i;
|
||||
EnumMore = CLIPOBJ_bEnum(ClipRegion, sizeof(RectEnum), (PVOID) &RectEnum);
|
||||
DPRINT("EnumMore: %d, count: %d\n", EnumMore, RectEnum.c);
|
||||
for( i=0; i<RectEnum.c; i++){
|
||||
|
|
|
@ -303,9 +303,9 @@ VGADDI_ComputePointerRect(PPDEV ppdev, LONG X, LONG Y, PRECTL Rect)
|
|||
{
|
||||
ULONG SizeX, SizeY;
|
||||
|
||||
SizeX = min(((X + ppdev->pPointerAttributes->Width) + 7) & ~0x7, ppdev->sizeSurf.cx);
|
||||
SizeX = min(((X + (LONG)ppdev->pPointerAttributes->Width) + 7) & ~0x7, ppdev->sizeSurf.cx);
|
||||
SizeX -= (X & ~0x7);
|
||||
SizeY = min(ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - Y);
|
||||
SizeY = min((LONG)ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - Y);
|
||||
|
||||
Rect->left = max(X, 0) & ~0x7;
|
||||
Rect->top = max(Y, 0);
|
||||
|
@ -365,8 +365,8 @@ VGADDI_ShowCursor(PPDEV ppdev, PRECTL prcl)
|
|||
Rect.bottom - Rect.top);
|
||||
|
||||
/* Display the cursor. */
|
||||
SizeX = min(ppdev->pPointerAttributes->Width, ppdev->sizeSurf.cx - cx);
|
||||
SizeY = min(ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - cy);
|
||||
SizeX = min((LONG)ppdev->pPointerAttributes->Width, ppdev->sizeSurf.cx - cx);
|
||||
SizeY = min((LONG)ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - cy);
|
||||
AndMask = ppdev->pPointerAttributes->Pixels +
|
||||
(ppdev->pPointerAttributes->Height - SizeY) * ppdev->pPointerAttributes->WidthInBytes;
|
||||
VGADDI_BltPointerToVGA(cx,
|
||||
|
|
|
@ -266,7 +266,7 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
|
|||
UCHAR a;
|
||||
ULONG pre1;
|
||||
ULONG orgpre1, orgx, midpre1;
|
||||
ULONG ileftpix, imidpix, irightpix;
|
||||
LONG ileftpix, imidpix, irightpix;
|
||||
|
||||
orgx = x;
|
||||
|
||||
|
@ -341,7 +341,7 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
|
|||
|
||||
BOOL vgaVLine(INT x, INT y, INT len, UCHAR c)
|
||||
{
|
||||
ULONG offset, i;
|
||||
INT offset, i;
|
||||
UCHAR a;
|
||||
|
||||
offset = xconv[x]+y80[y];
|
||||
|
@ -391,9 +391,9 @@ void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
|
|||
ULONG left = x >> 3;
|
||||
ULONG shift = x - (x & ~0x7);
|
||||
UCHAR pixel, nextpixel;
|
||||
ULONG rightcount;
|
||||
ULONG i, j;
|
||||
ULONG stride = w >> 3;
|
||||
LONG rightcount;
|
||||
INT i, j;
|
||||
LONG stride = w >> 3;
|
||||
|
||||
/* Calculate the number of rightmost bytes not in a dword block. */
|
||||
if (w >= 8)
|
||||
|
@ -528,9 +528,9 @@ void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
|
|||
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod)
|
||||
{
|
||||
PBYTE pb, opb = b;
|
||||
ULONG i, j;
|
||||
ULONG x2 = x + w;
|
||||
ULONG y2 = y + h;
|
||||
LONG i, j;
|
||||
LONG x2 = x + w;
|
||||
LONG y2 = y + h;
|
||||
ULONG offset;
|
||||
UCHAR a;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ VGA_REGISTERS TextModeRegs;
|
|||
STATIC VOID FASTCALL
|
||||
vgaSaveRegisters(PVGA_REGISTERS Registers)
|
||||
{
|
||||
int i;
|
||||
UINT i;
|
||||
|
||||
for (i = 0; i < sizeof(Registers->CRT); i++)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ vgaSaveRegisters(PVGA_REGISTERS Registers)
|
|||
STATIC VOID FASTCALL
|
||||
vgaSetRegisters(PVGA_REGISTERS Registers)
|
||||
{
|
||||
int i;
|
||||
UINT i;
|
||||
|
||||
/* Update misc output register */
|
||||
VideoPortWritePortUchar(MISC, Registers->Misc);
|
||||
|
|
|
@ -98,7 +98,7 @@ typedef struct _KPROFILE
|
|||
PVOID RegionEnd;
|
||||
ULONG BucketShift;
|
||||
PVOID Buffer;
|
||||
CSHORT Source;
|
||||
KPROFILE_SOURCE Source;
|
||||
ULONG Affinity;
|
||||
BOOLEAN Active;
|
||||
struct _KPROCESS *Process;
|
||||
|
|
|
@ -69,7 +69,7 @@ typedef NTSTATUS (NTAPI * PEXEFMT_LOADER)
|
|||
* as opposed to STATUS_INVALID_IMAGE_FORMAT meaning the format is supported,
|
||||
* but the particular file is malformed
|
||||
*/
|
||||
#define STATUS_ROS_EXEFMT_UNKNOWN_FORMAT (0xA0100001)
|
||||
#define STATUS_ROS_EXEFMT_UNKNOWN_FORMAT ((NTSTATUS)0xA0100001)
|
||||
|
||||
/*
|
||||
* Returned by MmCreateSection to signal successful loading of an executable
|
||||
|
@ -78,7 +78,7 @@ typedef NTSTATUS (NTAPI * PEXEFMT_LOADER)
|
|||
* STATUS_ROS_EXEFMT_LOADED_FORMAT and the appropriate EXEFMT_LOADED_XXX
|
||||
*/
|
||||
#define FACILITY_ROS_EXEFMT_FORMAT (0x11)
|
||||
#define STATUS_ROS_EXEFMT_LOADED_FORMAT (0x60110000)
|
||||
#define STATUS_ROS_EXEFMT_LOADED_FORMAT ((NTSTATUS)0x60110000)
|
||||
|
||||
/* non-standard format, ZwQuerySection required to retrieve the format tag */
|
||||
#define EXEFMT_LOADED_EXTENDED (0x0000FFFF)
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef struct _CHECKLISTWND
|
|||
BOOL FocusVisible;
|
||||
|
||||
COLORREF TextColor[2];
|
||||
UINT CheckBoxLeft[2];
|
||||
INT CheckBoxLeft[2];
|
||||
|
||||
BOOL QuickSearchEnabled;
|
||||
PCHECKITEM QuickSearchHitItem;
|
||||
|
@ -531,7 +531,7 @@ UpdateControl(IN PCHECKLISTWND infoPtr,
|
|||
|
||||
VisibleItems = (rcClient.bottom - rcClient.top) / infoPtr->ItemHeight;
|
||||
|
||||
if (ScrollInfo.nPage == VisibleItems && ScrollInfo.nMax > 0)
|
||||
if (ScrollInfo.nPage == (UINT)VisibleItems && ScrollInfo.nMax > 0)
|
||||
{
|
||||
ScrollInfo.nMax--;
|
||||
}
|
||||
|
@ -1456,7 +1456,7 @@ QuickSearchFindHit(IN PCHECKLISTWND infoPtr,
|
|||
default:
|
||||
{
|
||||
INT SearchLen = wcslen(infoPtr->QuickSearchText);
|
||||
if (SearchLen < (sizeof(infoPtr->QuickSearchText) / sizeof(infoPtr->QuickSearchText[0])) - 1)
|
||||
if (SearchLen < (INT)(sizeof(infoPtr->QuickSearchText) / sizeof(infoPtr->QuickSearchText[0])) - 1)
|
||||
{
|
||||
infoPtr->QuickSearchText[SearchLen++] = c;
|
||||
infoPtr->QuickSearchText[SearchLen] = L'\0';
|
||||
|
@ -1832,7 +1832,7 @@ CheckListWndProc(IN HWND hwnd,
|
|||
|
||||
case CLM_SETCHECKBOXCOLUMN:
|
||||
{
|
||||
infoPtr->CheckBoxLeft[wParam != CLB_DENY] = (UINT)lParam;
|
||||
infoPtr->CheckBoxLeft[wParam != CLB_DENY] = (INT)lParam;
|
||||
Ret = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -1894,7 +1894,7 @@ CheckListWndProc(IN HWND hwnd,
|
|||
{
|
||||
LPSTYLESTRUCT Style = (LPSTYLESTRUCT)lParam;
|
||||
|
||||
if (wParam == GWL_STYLE)
|
||||
if (wParam == (WPARAM)GWL_STYLE)
|
||||
{
|
||||
BOOL AllowChangeStyle;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ static void checkc_global(adns_state ads) {
|
|||
break;
|
||||
case server_disconnected:
|
||||
case server_broken:
|
||||
assert(ads->tcpsocket == -1);
|
||||
assert(ads->tcpsocket == INVALID_SOCKET);
|
||||
checkc_notcpbuf(ads);
|
||||
break;
|
||||
case server_ok:
|
||||
|
|
|
@ -286,7 +286,7 @@ int adns_submit_reverse_any(adns_state ads,
|
|||
iaddr= (const unsigned char*) &(((const struct sockaddr_in*)addr) -> sin_addr);
|
||||
|
||||
lreq= strlen(zone) + 4*4 + 1;
|
||||
if (lreq > sizeof(shortbuf)) {
|
||||
if (lreq > (int)sizeof(shortbuf)) {
|
||||
buf= malloc( strlen(zone) + 4*4 + 1 );
|
||||
if (!buf) return errno;
|
||||
buf_free= buf;
|
||||
|
|
|
@ -222,7 +222,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
|
|||
* it contains the relevant info.
|
||||
*/
|
||||
}
|
||||
} else if (rrtype == (qu->typei->type & adns__rrt_typemask)) {
|
||||
} else if (rrtype == ((INT)qu->typei->type & (INT)adns__rrt_typemask)) {
|
||||
wantedrrs++;
|
||||
} else {
|
||||
adns__debug(ads,serv,qu,"ignoring answer RR with irrelevant type %d",rrtype);
|
||||
|
@ -322,7 +322,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
|
|||
&ownermatched);
|
||||
assert(!st); assert(rrtype != -1);
|
||||
if (rrclass != DNS_CLASS_IN ||
|
||||
rrtype != (qu->typei->type & adns__rrt_typemask) ||
|
||||
rrtype != ((INT)qu->typei->type & (INT)adns__rrt_typemask) ||
|
||||
!ownermatched)
|
||||
continue;
|
||||
adns__update_expires(qu,ttl,now);
|
||||
|
|
|
@ -163,7 +163,7 @@ static void ccf_sortlist(adns_state ads, const char *fn, int lno, const char *bu
|
|||
return;
|
||||
}
|
||||
|
||||
if (l >= sizeof(tbuf)) {
|
||||
if (l >= (int)sizeof(tbuf)) {
|
||||
configparseerr(ads,fn,lno,"sortlist entry `%.*s' too long",l,word);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -749,7 +749,7 @@ static adns_status pa_ptr(const parseinfo *pai, int dmstart, int max, void *data
|
|||
if (lablen>1 && pai->qu->query_dgram[labstart]=='0')
|
||||
return adns_s_querydomainwrong;
|
||||
}
|
||||
for (i=0; i<sizeof(expectdomain)/sizeof(*expectdomain); i++) {
|
||||
for (i=0; i<(int)sizeof(expectdomain)/(int)sizeof(*expectdomain); i++) {
|
||||
st= adns__findlabel_next(&fls,&lablen,&labstart); assert(!st);
|
||||
l= strlen(expectdomain[i]);
|
||||
if (lablen != l || memcmp(pai->qu->query_dgram + labstart, expectdomain[i], (size_t)l))
|
||||
|
|
|
@ -126,7 +126,7 @@ static inline BOOL CRYPT_ANSIToUnicode(LPCSTR str, LPWSTR* wstr, int wstrsize)
|
|||
return TRUE;
|
||||
}
|
||||
wcount = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
wcount = wcount < wstrsize/sizeof(WCHAR) ? wcount : wstrsize/sizeof(WCHAR);
|
||||
wcount = wcount < wstrsize/(int)sizeof(WCHAR) ? wcount : wstrsize/(int)sizeof(WCHAR);
|
||||
if (wstrsize == -1)
|
||||
*wstr = CRYPT_Alloc(wcount * sizeof(WCHAR));
|
||||
if (*wstr)
|
||||
|
|
|
@ -272,7 +272,7 @@ IsNTAdmin( DWORD Reserved,
|
|||
PDWORD PReserved )
|
||||
{
|
||||
HANDLE Process, Token;
|
||||
INT i;
|
||||
UINT i;
|
||||
BOOL Good = FALSE;
|
||||
DWORD Buffer[4096];
|
||||
DWORD Size;
|
||||
|
|
|
@ -247,7 +247,7 @@ OnDisplayDeviceChanged(IN HWND hwndDlg, IN PDISPLAY_DEVICE_ENTRY pDeviceEntry)
|
|||
if (LoadString(hApplet, (2900 + Current->dmBitsPerPel), Buffer, sizeof(Buffer) / sizeof(TCHAR)))
|
||||
{
|
||||
index = SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)Buffer);
|
||||
if (index == CB_ERR)
|
||||
if (index == (DWORD)CB_ERR)
|
||||
{
|
||||
index = SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_ADDSTRING, 0, (LPARAM)Buffer);
|
||||
SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_SETITEMDATA, index, Current->dmBitsPerPel);
|
||||
|
@ -519,7 +519,7 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar
|
|||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
if (lpnm->code == PSN_APPLY)
|
||||
if (lpnm->code == (UINT)PSN_APPLY)
|
||||
{
|
||||
if (CurrentDisplayDevice->CurrentSettings->dmPelsWidth != CurrentDisplayDevice->InitialSettings.dmPelsWidth
|
||||
|| CurrentDisplayDevice->CurrentSettings->dmPelsHeight != CurrentDisplayDevice->InitialSettings.dmPelsHeight
|
||||
|
|
|
@ -153,7 +153,7 @@ LocalePageProc(HWND hwndDlg,
|
|||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
if (lpnm->code == PSN_APPLY)
|
||||
if (lpnm->code == (UINT)PSN_APPLY)
|
||||
{
|
||||
// Apply changes
|
||||
LCID NewLcid;
|
||||
|
@ -172,7 +172,7 @@ LocalePageProc(HWND hwndDlg,
|
|||
iCurSel,
|
||||
0);
|
||||
|
||||
if (NewLcid == CB_ERR)
|
||||
if (NewLcid == (LCID)CB_ERR)
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ TimePageProc(HWND hwndDlg,
|
|||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
|
||||
if (lpnm->code == PSN_APPLY)
|
||||
if (lpnm->code == (UINT)PSN_APPLY)
|
||||
{
|
||||
WCHAR Buffer[80];
|
||||
int nIndex;
|
||||
|
|
|
@ -24,7 +24,7 @@ _TCHAR* _tgetcwd(_TCHAR* buf, int size)
|
|||
return _tcsdup(dir);
|
||||
}
|
||||
|
||||
if (dir_len >= size)
|
||||
if (dir_len >= (DWORD)size)
|
||||
{
|
||||
__set_errno(ERANGE);
|
||||
return NULL; /* buf too small */
|
||||
|
|
|
@ -22,7 +22,7 @@ int _taccess( const _TCHAR *_path, int _amode )
|
|||
DWORD Attributes = GetFileAttributes(_path);
|
||||
DPRINT(MK_STR(_taccess)"('%"_TS"', %x)\n", _path, _amode);
|
||||
|
||||
if (Attributes == -1) {
|
||||
if (Attributes == (DWORD)-1) {
|
||||
_dosmaperr(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ int access_dirT(const _TCHAR *_path)
|
|||
DWORD Attributes = GetFileAttributes(_path);
|
||||
DPRINT(MK_STR(is_dirT)"('%"_TS"')\n", _path);
|
||||
|
||||
if (Attributes == -1) {
|
||||
if (Attributes == (DWORD)-1) {
|
||||
_dosmaperr(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ int _tchmod(const _TCHAR* filename, mode_t mode)
|
|||
DPRINT(#_tchmod"('%"sT"', %x)\n", filename, mode);
|
||||
|
||||
FileAttributes = GetFileAttributes(filename);
|
||||
if ( FileAttributes == -1 ) {
|
||||
if ( FileAttributes == (DWORD)-1 ) {
|
||||
_dosmaperr(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ const _TCHAR* find_execT(const _TCHAR* path, _TCHAR* rpath)
|
|||
{
|
||||
_TCHAR *rp;
|
||||
const _TCHAR *rd;
|
||||
int i, found = 0;
|
||||
unsigned int i, found = 0;
|
||||
|
||||
DPRINT(MK_STR(find_execT)"('%"sT"', %x)\n", path, rpath);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ void *_lfind(const void *key, const void *base, size_t *nelp,
|
|||
size_t width, int (*compar)(const void *, const void *))
|
||||
{
|
||||
char* char_base = (char*)base;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < *nelp; i++) {
|
||||
if (compar(key, char_base) == 0)
|
||||
|
|
|
@ -42,7 +42,7 @@ static sig_element signal_list[] =
|
|||
__p_sig_fn_t signal(int sig, __p_sig_fn_t func)
|
||||
{
|
||||
__p_sig_fn_t temp;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
switch (sig)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ int
|
|||
raise(int sig)
|
||||
{
|
||||
__p_sig_fn_t temp = 0;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
switch (sig)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ size_t fread(void *vptr, size_t size, size_t count, FILE *iop)
|
|||
|
||||
if (iop->_cnt > 0 && to_read > 0)
|
||||
{
|
||||
copy = min(iop->_cnt, to_read);
|
||||
copy = min((size_t)iop->_cnt, to_read);
|
||||
memcpy(ptr, iop->_ptr, copy);
|
||||
ptr += copy;
|
||||
iop->_ptr += copy;
|
||||
|
@ -58,7 +58,7 @@ size_t fread(void *vptr, size_t size, size_t count, FILE *iop)
|
|||
if (to_read > 0)
|
||||
{
|
||||
|
||||
if (to_read >= iop->_bufsiz)
|
||||
if (to_read >= (size_t)iop->_bufsiz)
|
||||
{
|
||||
n_read = _read(_fileno(iop), ptr, to_read);
|
||||
if (n_read < 0)
|
||||
|
@ -78,7 +78,7 @@ size_t fread(void *vptr, size_t size, size_t count, FILE *iop)
|
|||
{
|
||||
*ptr++ = c;
|
||||
to_read--;
|
||||
copy = min(iop->_cnt, to_read);
|
||||
copy = min((size_t)iop->_cnt, to_read);
|
||||
memcpy(ptr, iop->_ptr, copy);
|
||||
iop->_ptr += copy;
|
||||
iop->_cnt -= copy;
|
||||
|
|
|
@ -62,7 +62,7 @@ size_t fwrite(const void *vptr, size_t size, size_t count, FILE *iop)
|
|||
{
|
||||
if (iop->_cnt > 0 && to_write > 0)
|
||||
{
|
||||
copy = min(iop->_cnt, to_write);
|
||||
copy = min((size_t)iop->_cnt, to_write);
|
||||
memcpy(iop->_ptr, ptr, copy);
|
||||
ptr += copy;
|
||||
iop->_ptr += copy;
|
||||
|
@ -76,7 +76,7 @@ size_t fwrite(const void *vptr, size_t size, size_t count, FILE *iop)
|
|||
// if the buffer is dirty it will have to be written now
|
||||
// otherwise the file pointer won't match anymore.
|
||||
fflush(iop);
|
||||
if (to_write >= iop->_bufsiz)
|
||||
if (to_write >= (size_t)iop->_bufsiz)
|
||||
{
|
||||
while (to_write > 0)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ fcvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf)
|
|||
|
||||
/* Where's the decimal point? */
|
||||
dot = strchr (s, decimal);
|
||||
*decpt = dot ? dot - s : strlen (s);
|
||||
*decpt = dot ? dot - s : (int)strlen (s);
|
||||
|
||||
/* SunOS docs says if NDIGITS is 8 or more, produce "Infinity"
|
||||
instead of "Inf". */
|
||||
|
|
|
@ -18,7 +18,7 @@ char *getenv(const char *name)
|
|||
{
|
||||
char *str = *environ;
|
||||
char *pos = strchr(str,'=');
|
||||
if (pos && ((pos - str) == length) && !_strnicmp(str, name, length))
|
||||
if (pos && ((unsigned int)(pos - str) == length) && !_strnicmp(str, name, length))
|
||||
return pos + 1;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -36,7 +36,7 @@ wchar_t *_wgetenv(const wchar_t *name)
|
|||
{
|
||||
wchar_t *str = *environ;
|
||||
wchar_t *pos = wcschr(str, L'=');
|
||||
if (pos && ((pos - str) == length) && !_wcsnicmp(str, name, length))
|
||||
if (pos && ((unsigned int)(pos - str) == length) && !_wcsnicmp(str, name, length))
|
||||
return pos + 1;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
char* _strnset (char* szToFill, int szFill, size_t sizeMaxFill)
|
||||
{
|
||||
char *t = szToFill;
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
while( *szToFill != 0 && i < sizeMaxFill)
|
||||
{
|
||||
*szToFill = szFill;
|
||||
|
|
|
@ -311,7 +311,7 @@ static int tzload(const char* name, struct state* CPP_CONST sp)
|
|||
else
|
||||
{
|
||||
i = _read(fid, buf, sizeof buf);
|
||||
if (_close(fid) != 0 || i < sizeof *tzhp)
|
||||
if (_close(fid) != 0 || i < (int)sizeof *tzhp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -327,12 +327,12 @@ static int tzload(const char* name, struct state* CPP_CONST sp)
|
|||
sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS ||
|
||||
(ttisstdcnt != sp->typecnt && ttisstdcnt != 0))
|
||||
return -1;
|
||||
if (i < sizeof *tzhp +
|
||||
sp->timecnt * (4 + sizeof (char)) +
|
||||
sp->typecnt * (4 + 2 * sizeof (char)) +
|
||||
sp->charcnt * sizeof (char) +
|
||||
if (i < (int)sizeof *tzhp +
|
||||
sp->timecnt * (4 + (int)sizeof (char)) +
|
||||
sp->typecnt * (4 + 2 * (int)sizeof (char)) +
|
||||
sp->charcnt * (int)sizeof (char) +
|
||||
sp->leapcnt * 2 * 4 +
|
||||
ttisstdcnt * sizeof (char))
|
||||
ttisstdcnt * (int)sizeof (char))
|
||||
return -1;
|
||||
p = buf + sizeof *tzhp;
|
||||
for (i = 0; i < sp->timecnt; ++i)
|
||||
|
@ -692,8 +692,8 @@ tzparse(const char *name, struct state * CPP_CONST sp, const int lastditch)
|
|||
{
|
||||
stdlen = strlen(name); /* length of standard zone name */
|
||||
name += stdlen;
|
||||
if (stdlen >= sizeof sp->chars)
|
||||
stdlen = (sizeof sp->chars) - 1;
|
||||
if (stdlen >= (int)sizeof sp->chars)
|
||||
stdlen = (int)(sizeof sp->chars) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -883,7 +883,7 @@ tzparse(const char *name, struct state * CPP_CONST sp, const int lastditch)
|
|||
sp->charcnt = stdlen + 1;
|
||||
if (dstlen != 0)
|
||||
sp->charcnt += dstlen + 1;
|
||||
if (sp->charcnt > sizeof sp->chars)
|
||||
if (sp->charcnt > (int)sizeof sp->chars)
|
||||
return -1;
|
||||
cp = sp->chars;
|
||||
(void) strncpy(cp, stdname, stdlen);
|
||||
|
|
|
@ -235,7 +235,7 @@ size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const struct
|
|||
{
|
||||
char *x;
|
||||
char *f;
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
x = malloc(maxsize);
|
||||
j = wcslen(format);
|
||||
f = malloc(j+1);
|
||||
|
|
|
@ -212,7 +212,7 @@ static void cxx_local_unwind( cxx_exception_frame* frame, cxx_function_descr *de
|
|||
|
||||
while (trylevel != last_level)
|
||||
{
|
||||
if (trylevel < 0 || trylevel >= descr->unwind_count)
|
||||
if (trylevel < 0 || trylevel >= (int)descr->unwind_count)
|
||||
{
|
||||
ERR( "invalid trylevel %d\n", trylevel );
|
||||
MSVCRT_terminate();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill)
|
||||
{
|
||||
wchar_t *t = wsToFill;
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
while( *wsToFill != 0 && i < sizeMaxFill)
|
||||
{
|
||||
*wsToFill = wcFill;
|
||||
|
|
|
@ -118,7 +118,7 @@ DNS_STATUS WINAPI DnsQuery_W
|
|||
PIP4_ARRAY Servers,
|
||||
PDNS_RECORD *QueryResultSet,
|
||||
PVOID *Reserved ) {
|
||||
int i;
|
||||
UINT i;
|
||||
PCHAR Buffer;
|
||||
DNS_STATUS Status;
|
||||
PDNS_RECORD QueryResultWide;
|
||||
|
@ -301,7 +301,7 @@ DNS_STATUS WINAPI DnsQuery_UTF8
|
|||
}
|
||||
|
||||
void DnsIntFreeRecordList( PDNS_RECORD ToDelete ) {
|
||||
int i;
|
||||
UINT i;
|
||||
PDNS_RECORD next = 0;
|
||||
|
||||
while( ToDelete ) {
|
||||
|
|
|
@ -286,17 +286,17 @@ Fat16Format (HANDLE FileHandle,
|
|||
/* Calculate cluster size */
|
||||
if (ClusterSize == 0)
|
||||
{
|
||||
if (PartitionInfo->PartitionLength.QuadPart < 16ULL * 1024ULL * 1024ULL)
|
||||
if (PartitionInfo->PartitionLength.QuadPart < 16LL * 1024LL * 1024LL)
|
||||
{
|
||||
/* Partition < 16MB ==> 1KB Cluster */
|
||||
ClusterSize = 1024;
|
||||
}
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 128ULL * 1024ULL * 1024ULL)
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 128LL * 1024LL * 1024LL)
|
||||
{
|
||||
/* Partition < 128MB ==> 2KB Cluster */
|
||||
ClusterSize = 2048;
|
||||
}
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 256ULL * 1024ULL * 1024ULL)
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 256LL * 1024LL * 1024LL)
|
||||
{
|
||||
/* Partition < 256MB ==> 4KB Cluster */
|
||||
ClusterSize = 4096;
|
||||
|
|
|
@ -358,17 +358,17 @@ Fat32Format (HANDLE FileHandle,
|
|||
/* Calculate cluster size */
|
||||
if (ClusterSize == 0)
|
||||
{
|
||||
if (PartitionInfo->PartitionLength.QuadPart < 8ULL * 1024ULL * 1024ULL * 1024ULL)
|
||||
if (PartitionInfo->PartitionLength.QuadPart < 8LL * 1024LL * 1024LL * 1024LL)
|
||||
{
|
||||
/* Partition < 8GB ==> 4KB Cluster */
|
||||
ClusterSize = 4096;
|
||||
}
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 16ULL * 1024ULL * 1024ULL * 1024ULL)
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 16LL * 1024LL * 1024LL * 1024LL)
|
||||
{
|
||||
/* Partition 8GB - 16GB ==> 8KB Cluster */
|
||||
ClusterSize = 8192;
|
||||
}
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 32ULL * 1024ULL * 1024ULL * 1024ULL)
|
||||
else if (PartitionInfo->PartitionLength.QuadPart < 32LL * 1024LL * 1024LL * 1024LL)
|
||||
{
|
||||
/* Partition 16GB - 32GB ==> 16KB Cluster */
|
||||
ClusterSize = 16384;
|
||||
|
|
|
@ -146,7 +146,7 @@ VfatFormat (PUNICODE_STRING DriveRoot,
|
|||
Callback (PROGRESS, 0, (PVOID)&Context.Percent);
|
||||
}
|
||||
|
||||
if (PartitionInfo.PartitionLength.QuadPart < (4200ULL * 1024ULL))
|
||||
if (PartitionInfo.PartitionLength.QuadPart < (4200LL * 1024LL))
|
||||
{
|
||||
/* FAT12 (volume is smaller than 4.1MB) */
|
||||
Status = Fat12Format (FileHandle,
|
||||
|
@ -157,7 +157,7 @@ VfatFormat (PUNICODE_STRING DriveRoot,
|
|||
ClusterSize,
|
||||
&Context);
|
||||
}
|
||||
else if (PartitionInfo.PartitionLength.QuadPart < (512ULL * 1024ULL * 1024ULL))
|
||||
else if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL))
|
||||
{
|
||||
/* FAT16 (volume is smaller than 512MB) */
|
||||
Status = Fat16Format (FileHandle,
|
||||
|
|
|
@ -44,7 +44,7 @@ GdiQueryTable(VOID)
|
|||
BOOL GdiIsHandleValid(HGDIOBJ hGdiObj)
|
||||
{
|
||||
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
|
||||
if(Entry->KernelData != NULL && (Entry->Type & GDI_HANDLE_TYPE_MASK) == GDI_HANDLE_GET_TYPE(hGdiObj))
|
||||
if(Entry->KernelData != NULL && (Entry->Type & GDI_HANDLE_TYPE_MASK) == (LONG)GDI_HANDLE_GET_TYPE(hGdiObj))
|
||||
{
|
||||
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
|
||||
if(pid == NULL || pid == CurrentProcessId)
|
||||
|
@ -58,7 +58,7 @@ BOOL GdiIsHandleValid(HGDIOBJ hGdiObj)
|
|||
BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, PVOID *UserData)
|
||||
{
|
||||
PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hGdiObj);
|
||||
if(Entry->KernelData != NULL && (Entry->Type & GDI_HANDLE_TYPE_MASK) == GDI_HANDLE_GET_TYPE(hGdiObj))
|
||||
if(Entry->KernelData != NULL && (Entry->Type & GDI_HANDLE_TYPE_MASK) == (LONG)GDI_HANDLE_GET_TYPE(hGdiObj))
|
||||
{
|
||||
HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
|
||||
if(pid == NULL || pid == CurrentProcessId)
|
||||
|
|
|
@ -254,7 +254,7 @@ GetObjectA(HGDIOBJ Handle, int Size, LPVOID Buffer)
|
|||
|
||||
if (OBJ_FONT == Type)
|
||||
{
|
||||
if (Size < sizeof(LOGFONTA))
|
||||
if (Size < (int)sizeof(LOGFONTA))
|
||||
{
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
return 0;
|
||||
|
|
|
@ -183,10 +183,10 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam,
|
|||
BOOL Unicode)
|
||||
{
|
||||
int FontFamilyCount;
|
||||
unsigned FontFamilySize;
|
||||
int FontFamilySize;
|
||||
PFONTFAMILYINFO Info;
|
||||
int Ret = 0;
|
||||
unsigned i;
|
||||
int i;
|
||||
ENUMLOGFONTEXA EnumLogFontExA;
|
||||
NEWTEXTMETRICEXA NewTextMetricExA;
|
||||
|
||||
|
|
|
@ -39,19 +39,19 @@ InternalIsOS2OrOldWin(HANDLE hFile, IMAGE_DOS_HEADER *mz, IMAGE_OS2_HEADER *ne)
|
|||
CurPos = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
|
||||
|
||||
/* read modref table */
|
||||
if((SetFilePointer(hFile, mz->e_lfanew + ne->ne_modtab, NULL, FILE_BEGIN) == -1) ||
|
||||
if((SetFilePointer(hFile, mz->e_lfanew + ne->ne_modtab, NULL, FILE_BEGIN) == (DWORD)-1) ||
|
||||
(!(modtab = HeapAlloc(GetProcessHeap(), 0, ne->ne_cmod * sizeof(WORD)))) ||
|
||||
(!(ReadFile(hFile, modtab, ne->ne_cmod * sizeof(WORD), &Read, NULL))) ||
|
||||
(Read != ne->ne_cmod * sizeof(WORD)))
|
||||
(Read != (DWORD)ne->ne_cmod * sizeof(WORD)))
|
||||
{
|
||||
goto broken;
|
||||
}
|
||||
|
||||
/* read imported names table */
|
||||
if((SetFilePointer(hFile, mz->e_lfanew + ne->ne_imptab, NULL, FILE_BEGIN) == -1) ||
|
||||
if((SetFilePointer(hFile, mz->e_lfanew + ne->ne_imptab, NULL, FILE_BEGIN) == (DWORD)-1) ||
|
||||
(!(nametab = HeapAlloc(GetProcessHeap(), 0, ne->ne_enttab - ne->ne_imptab))) ||
|
||||
(!(ReadFile(hFile, nametab, ne->ne_enttab - ne->ne_imptab, &Read, NULL))) ||
|
||||
(Read != ne->ne_enttab - ne->ne_imptab))
|
||||
(Read != (DWORD)ne->ne_enttab - ne->ne_imptab))
|
||||
{
|
||||
goto broken;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ InternalGetBinaryType(HANDLE hFile)
|
|||
char magic[4];
|
||||
DWORD Read;
|
||||
|
||||
if((SetFilePointer(hFile, 0, NULL, FILE_BEGIN) == -1) ||
|
||||
if((SetFilePointer(hFile, 0, NULL, FILE_BEGIN) == (DWORD)-1) ||
|
||||
(!ReadFile(hFile, &Header, sizeof(Header), &Read, NULL) ||
|
||||
(Read != sizeof(Header))))
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ InternalGetBinaryType(HANDLE hFile)
|
|||
* This will tell us if there is more header information
|
||||
* to read or not.
|
||||
*/
|
||||
if((SetFilePointer(hFile, Header.mz.e_lfanew, NULL, FILE_BEGIN) == -1) ||
|
||||
if((SetFilePointer(hFile, Header.mz.e_lfanew, NULL, FILE_BEGIN) == (DWORD)-1) ||
|
||||
(!ReadFile(hFile, magic, sizeof(magic), &Read, NULL) ||
|
||||
(Read != sizeof(magic))))
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ FilenameU2A_FitOrFail(
|
|||
ret = bIsFileApiAnsi? RtlUnicodeStringToAnsiSize(SourceU) : RtlUnicodeStringToOemSize(SourceU);
|
||||
/* ret incl. nullchar */
|
||||
|
||||
if (DestA && ret <= destLen)
|
||||
if (DestA && (INT)ret <= destLen)
|
||||
{
|
||||
ANSI_STRING str;
|
||||
|
||||
|
|
|
@ -3469,7 +3469,7 @@ SetConsoleInputExeNameW(LPCWSTR lpInputExeName)
|
|||
int lenName = lstrlenW(lpInputExeName);
|
||||
|
||||
if(lenName < 1 ||
|
||||
lenName > (sizeof(InputExeName) / sizeof(InputExeName[0])) - 1)
|
||||
lenName > (int)(sizeof(InputExeName) / sizeof(InputExeName[0])) - 1)
|
||||
{
|
||||
/* Fail if string is empty or too long */
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
|
@ -3551,7 +3551,7 @@ GetConsoleInputExeNameW(DWORD nBufferLength, LPWSTR lpBuffer)
|
|||
RtlEnterCriticalSection(&ConsoleLock);
|
||||
|
||||
lenName = lstrlenW(InputExeName);
|
||||
if(lenName >= nBufferLength)
|
||||
if(lenName >= (int)nBufferLength)
|
||||
{
|
||||
/* buffer is not large enough, return the required size */
|
||||
RtlLeaveCriticalSection(&ConsoleLock);
|
||||
|
|
|
@ -247,7 +247,7 @@ DWORD WINAPI FormatMessageA(
|
|||
|
||||
#define ADD_TO_T(c) do { \
|
||||
*t++=c;\
|
||||
if (t-target == talloced) {\
|
||||
if ((DWORD)((ULONG_PTR)t-(ULONG_PTR)target) == talloced) {\
|
||||
target = (char*)RtlReAllocateHeap(RtlGetProcessHeap(),HEAP_ZERO_MEMORY,target,talloced*2);\
|
||||
t = target+talloced;\
|
||||
talloced*=2;\
|
||||
|
@ -500,7 +500,7 @@ DWORD WINAPI FormatMessageW(
|
|||
|
||||
#define ADD_TO_T(c) do {\
|
||||
*t++=c;\
|
||||
if (t-target == talloced) {\
|
||||
if ((DWORD)((ULONG_PTR)t-(ULONG_PTR)target) == talloced) {\
|
||||
target = (char*)RtlReAllocateHeap(RtlGetProcessHeap(),HEAP_ZERO_MEMORY,target,talloced*2);\
|
||||
t = target+talloced;\
|
||||
talloced*=2;\
|
||||
|
|
|
@ -720,7 +720,7 @@ GetLocaleInfoW (
|
|||
return 0;
|
||||
|
||||
ch = LockResource( hMem );
|
||||
for (i = 0; i < (LCType & 0x0f); i++) ch += *ch + 1;
|
||||
for (i = 0; i < (int)(LCType & 0x0f); i++) ch += *ch + 1;
|
||||
|
||||
if (uiFlags & LOCALE_RETURN_NUMBER) nRet = sizeof(UINT) / sizeof(WCHAR);
|
||||
else nRet = (LCType == LOCALE_FONTSIGNATURE) ? *ch : *ch + 1;
|
||||
|
|
|
@ -164,7 +164,7 @@ HFILE WINAPI LZInit( HFILE hfSrc )
|
|||
ret=read_header(hfSrc,&head);
|
||||
if (ret<=0) {
|
||||
_llseek(hfSrc,0,SEEK_SET);
|
||||
return ret?ret:hfSrc;
|
||||
return ret?(HFILE)ret:hfSrc;
|
||||
}
|
||||
for (i = 0; i < MAX_LZSTATES; i++) if (!lzstates[i]) break;
|
||||
if (i == MAX_LZSTATES) return LZERROR_GLOBALLOC;
|
||||
|
@ -424,7 +424,7 @@ LONG WINAPI LZSeek( HFILE fd, LONG off, INT type )
|
|||
newwanted = off;
|
||||
break;
|
||||
}
|
||||
if (newwanted>lzs->reallength)
|
||||
if (newwanted>(LONG)lzs->reallength)
|
||||
return LZERROR_BADVALUE;
|
||||
if (newwanted<0)
|
||||
return LZERROR_BADVALUE;
|
||||
|
|
|
@ -314,7 +314,7 @@ IntMultiByteToWideCharUTF8(DWORD Flags,
|
|||
LPCSTR MbsEnd;
|
||||
UCHAR Char, Length;
|
||||
WCHAR WideChar;
|
||||
ULONG Count;
|
||||
LONG Count;
|
||||
|
||||
if (Flags != 0)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len,
|
|||
}
|
||||
|
||||
wcsncpy( buffer, value, len );
|
||||
if (quote && (len >= wcslen(value)))
|
||||
if (quote && ((size_t)len >= wcslen(value)))
|
||||
buffer[wcslen(buffer) - 1] = '\0';
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ static inline ENCODING PROFILE_DetectTextEncoding(const void * buffer, int * len
|
|||
DWORD flags = IS_TEXT_UNICODE_SIGNATURE |
|
||||
IS_TEXT_UNICODE_REVERSE_SIGNATURE |
|
||||
IS_TEXT_UNICODE_ODD_LENGTH;
|
||||
if (*len >= sizeof(bom_utf8) && !memcmp(buffer, bom_utf8, sizeof(bom_utf8)))
|
||||
if (*len >= (int)sizeof(bom_utf8) && !memcmp(buffer, bom_utf8, sizeof(bom_utf8)))
|
||||
{
|
||||
*len = sizeof(bom_utf8);
|
||||
return ENCODING_UTF8;
|
||||
|
|
|
@ -146,7 +146,7 @@ GetSystemTimeAsFileTime (PFILETIME lpFileTime)
|
|||
lpFileTime->dwHighDateTime = SharedUserData->SystemTime.High1Time;
|
||||
lpFileTime->dwLowDateTime = SharedUserData->SystemTime.LowPart;
|
||||
}
|
||||
while (lpFileTime->dwHighDateTime != SharedUserData->SystemTime.High2Time);
|
||||
while (lpFileTime->dwHighDateTime != (DWORD)SharedUserData->SystemTime.High2Time);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ BOOL STDCALL CreateProcessA(LPCSTR lpApplicationName,
|
|||
nEnvLen = (ULONG_PTR)pcScan - (ULONG_PTR)lpEnvironment + 1;
|
||||
|
||||
/* environment too large */
|
||||
if(nEnvLen > ~((USHORT)0))
|
||||
if(nEnvLen > (SIZE_T)((USHORT)~0))
|
||||
{
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
return FALSE;
|
||||
|
|
|
@ -9,7 +9,7 @@ void *_lfind(const void *key, const void *base, size_t *nelp,
|
|||
size_t width, int (*compar)(const void *, const void *))
|
||||
{
|
||||
char* char_base = (char*)base;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < *nelp; i++)
|
||||
{
|
||||
|
|
|
@ -44,8 +44,8 @@ RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize, PROSSYM_INFO *RosSymI
|
|||
|
||||
/* Search for the section header */
|
||||
SectionHeader = IMAGE_FIRST_SECTION(NtHeaders);
|
||||
if (ImageSize < (char *) (SectionHeader + NtHeaders->FileHeader.NumberOfSections)
|
||||
- (char *) ImageStart)
|
||||
if (ImageSize < (ULONG_PTR)((char *) (SectionHeader + NtHeaders->FileHeader.NumberOfSections)
|
||||
- (char *) ImageStart))
|
||||
{
|
||||
DPRINT1("Image doesn't have valid section headers\n");
|
||||
return FALSE;
|
||||
|
|
|
@ -101,7 +101,7 @@ RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
|
|||
|
||||
DPRINT("RegistrationFrame is 0x%X\n", RegistrationFrame);
|
||||
|
||||
while ((ULONG_PTR)RegistrationFrame != -1)
|
||||
while ((ULONG_PTR)RegistrationFrame != (ULONG_PTR)-1)
|
||||
{
|
||||
EXCEPTION_RECORD ExceptionRecord2;
|
||||
//PVOID RegistrationFrameEnd = (PVOID)RegistrationFrame + 8;
|
||||
|
@ -304,7 +304,7 @@ RtlUnwind(PEXCEPTION_REGISTRATION RegistrationFrame,
|
|||
Context.Eax = EaxValue;
|
||||
|
||||
// Begin traversing the list of EXCEPTION_REGISTRATION
|
||||
while ((ULONG_PTR)ERHead != -1 && ERHead != RegistrationFrame)
|
||||
while ((ULONG_PTR)ERHead != (ULONG_PTR)-1 && ERHead != RegistrationFrame)
|
||||
{
|
||||
EXCEPTION_RECORD er2;
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ RtlCharToInteger(
|
|||
} else {
|
||||
digit = -1;
|
||||
} /* if */
|
||||
if (digit < 0 || digit >= base) {
|
||||
if (digit < 0 || digit >= (int)base) {
|
||||
*value = bMinus ? -RunningTotal : RunningTotal;
|
||||
return STATUS_SUCCESS;
|
||||
} /* if */
|
||||
|
@ -608,7 +608,7 @@ RtlIntegerToChar(
|
|||
tp++;
|
||||
}
|
||||
|
||||
if (tp - temp >= Length)
|
||||
if ((ULONG)((ULONG_PTR)tp - (ULONG_PTR)temp) >= Length)
|
||||
{
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ RtlIntegerToUnicode(
|
|||
tp++;
|
||||
}
|
||||
|
||||
if (tp - temp >= Length)
|
||||
if ((ULONG)((ULONG_PTR)tp - (ULONG_PTR)temp) >= Length)
|
||||
{
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
@ -936,7 +936,7 @@ RtlUnicodeStringToInteger(
|
|||
} else {
|
||||
digit = -1;
|
||||
} /* if */
|
||||
if (digit < 0 || digit >= base) {
|
||||
if (digit < 0 || digit >= (int)base) {
|
||||
*value = bMinus ? -RunningTotal : RunningTotal;
|
||||
return STATUS_SUCCESS;
|
||||
} /* if */
|
||||
|
@ -1759,7 +1759,7 @@ RtlLargeIntegerToChar(
|
|||
tp++;
|
||||
}
|
||||
|
||||
if (tp - temp >= Length)
|
||||
if ((ULONG)((ULONG_PTR)tp - (ULONG_PTR)temp) >= Length)
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
|
||||
sp = String;
|
||||
|
|
|
@ -240,8 +240,7 @@ AckPageDlgProc(HWND hwndDlg,
|
|||
LPNMHDR lpnm;
|
||||
PWCHAR Projects;
|
||||
PWCHAR End, CurrentProject;
|
||||
UINT ProjectsSize;
|
||||
int ProjectsCount;
|
||||
INT ProjectsSize, ProjectsCount;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
|
|
|
@ -681,7 +681,7 @@ INT
|
|||
EXPORT
|
||||
__WSAFDIsSet(SOCKET s, LPFD_SET set)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
for( i = 0; i < set->fd_count; i++ )
|
||||
if( set->fd_array[i] == s ) return TRUE;
|
||||
|
|
|
@ -385,7 +385,7 @@ WSAStringToAddressW(
|
|||
/* Report size */
|
||||
if (AddressFamily == AF_INET)
|
||||
{
|
||||
if (*lpAddressLength < sizeof(SOCKADDR_IN))
|
||||
if (*lpAddressLength < (INT)sizeof(SOCKADDR_IN))
|
||||
{
|
||||
*lpAddressLength = sizeof(SOCKADDR_IN);
|
||||
res = WSAEFAULT;
|
||||
|
@ -407,7 +407,7 @@ WSAStringToAddressW(
|
|||
|
||||
/* Get port number */
|
||||
pos = wcscspn(AddressString,L":") + 1;
|
||||
if (pos < wcslen(AddressString))
|
||||
if (pos < (int)wcslen(AddressString))
|
||||
sockaddr->sin_port = wcstol(&AddressString[pos],bp,10);
|
||||
|
||||
else
|
||||
|
@ -417,7 +417,7 @@ WSAStringToAddressW(
|
|||
pos=0;
|
||||
inetaddr=0;
|
||||
|
||||
while (pos < wcslen(AddressString))
|
||||
while (pos < (int)wcslen(AddressString))
|
||||
{
|
||||
inetaddr = (inetaddr<<8) + ((UCHAR)wcstol(&AddressString[pos],bp,10));
|
||||
pos += wcscspn( &AddressString[pos],L".") +1 ;
|
||||
|
|
|
@ -461,7 +461,7 @@ InterlockedPopEntrySList(IN PSLIST_HEADER ListHead)
|
|||
newslh.Next.Next = MmSafeReadPtr(&le->Next);
|
||||
} while(ExfInterlockedCompareExchange64((PLONGLONG)&ListHead->Alignment,
|
||||
(PLONGLONG)&newslh.Alignment,
|
||||
(PLONGLONG)&oldslh.Alignment) != oldslh.Alignment);
|
||||
(PLONGLONG)&oldslh.Alignment) != (LONGLONG)oldslh.Alignment);
|
||||
|
||||
return le;
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ InterlockedPushEntrySList(IN PSLIST_HEADER ListHead,
|
|||
ListEntry->Next = oldslh.Next.Next;
|
||||
} while(ExfInterlockedCompareExchange64((PLONGLONG)&ListHead->Alignment,
|
||||
(PLONGLONG)&newslh.Alignment,
|
||||
(PLONGLONG)&oldslh.Alignment) != oldslh.Alignment);
|
||||
(PLONGLONG)&oldslh.Alignment) != (LONGLONG)oldslh.Alignment);
|
||||
|
||||
return oldslh.Next.Next;
|
||||
}
|
||||
|
|
|
@ -728,7 +728,7 @@ QSI_DEF(SystemProcessorPerformanceInformation)
|
|||
PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION Spi
|
||||
= (PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) Buffer;
|
||||
|
||||
ULONG i;
|
||||
LONG i;
|
||||
LARGE_INTEGER CurrentTime;
|
||||
PKPRCB Prcb;
|
||||
|
||||
|
@ -836,7 +836,7 @@ ObpGetNextHandleByProcessCount(PSYSTEM_HANDLE_TABLE_ENTRY_INFO pshi,
|
|||
QSI_DEF(SystemHandleInformation)
|
||||
{
|
||||
PEPROCESS pr, syspr;
|
||||
int curSize, i = 0;
|
||||
ULONG curSize, i = 0;
|
||||
ULONG hCount = 0;
|
||||
|
||||
PSYSTEM_HANDLE_INFORMATION Shi =
|
||||
|
@ -1023,7 +1023,7 @@ QSI_DEF(SystemPoolTagInformation)
|
|||
QSI_DEF(SystemInterruptInformation)
|
||||
{
|
||||
PKPRCB Prcb;
|
||||
UINT i;
|
||||
LONG i;
|
||||
ULONG ti;
|
||||
PSYSTEM_INTERRUPT_INFORMATION sii = (PSYSTEM_INTERRUPT_INFORMATION)Buffer;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
/* GLOBALS ****************************************************************/
|
||||
|
||||
static FAST_MUTEX UuidMutex;
|
||||
static LARGE_INTEGER UuidLastTime;
|
||||
static ULARGE_INTEGER UuidLastTime;
|
||||
static ULONG UuidSequence;
|
||||
static BOOLEAN UuidSequenceInitialized = FALSE;
|
||||
static BOOLEAN UuidSequenceChanged = FALSE;
|
||||
|
|
|
@ -2627,7 +2627,7 @@ NtReadFile(IN HANDLE FileHandle,
|
|||
/* Check the Byte Offset */
|
||||
if (!ByteOffset ||
|
||||
(ByteOffset->u.LowPart == FILE_USE_FILE_POINTER_POSITION &&
|
||||
ByteOffset->u.HighPart == 0xffffffff))
|
||||
ByteOffset->u.HighPart == -1))
|
||||
{
|
||||
/* a valid ByteOffset is required if asynch. op. */
|
||||
if (!(FileObject->Flags & FO_SYNCHRONOUS_IO))
|
||||
|
@ -3226,7 +3226,7 @@ NtWriteFile (IN HANDLE FileHandle,
|
|||
/* Check the Byte Offset */
|
||||
if (!ByteOffset ||
|
||||
(ByteOffset->u.LowPart == FILE_USE_FILE_POINTER_POSITION &&
|
||||
ByteOffset->u.HighPart == 0xffffffff))
|
||||
ByteOffset->u.HighPart == -1))
|
||||
{
|
||||
/* a valid ByteOffset is required if asynch. op. */
|
||||
if (!(FileObject->Flags & FO_SYNCHRONOUS_IO))
|
||||
|
|
|
@ -62,7 +62,7 @@ INIT_FUNCTION
|
|||
IopInitLookasideLists(VOID)
|
||||
{
|
||||
ULONG LargeIrpSize, SmallIrpSize;
|
||||
ULONG i;
|
||||
LONG i;
|
||||
PKPRCB Prcb;
|
||||
PNPAGED_LOOKASIDE_LIST CurrentList = NULL;
|
||||
|
||||
|
|
|
@ -72,7 +72,8 @@ IoConnectInterrupt(PKINTERRUPT* InterruptObject,
|
|||
PIO_INTERRUPT IoInterrupt;
|
||||
PKSPIN_LOCK SpinLockUsed;
|
||||
BOOLEAN FirstRun = TRUE;
|
||||
ULONG i, count;
|
||||
ULONG count;
|
||||
LONG i;
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
|
@ -183,7 +184,7 @@ STDCALL
|
|||
IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
|
||||
|
||||
{
|
||||
ULONG i;
|
||||
LONG i;
|
||||
PIO_INTERRUPT IoInterrupt;
|
||||
|
||||
PAGED_CODE();
|
||||
|
|
|
@ -232,7 +232,7 @@ IoGetDmaAdapter(
|
|||
if (PhysicalDeviceObject != NULL)
|
||||
{
|
||||
if (DeviceDescription->InterfaceType == 0x0F /*PNPBus*/ ||
|
||||
DeviceDescription->InterfaceType == 0xFFFFFFFF)
|
||||
DeviceDescription->InterfaceType == (INTERFACE_TYPE)0xFFFFFFFF)
|
||||
{
|
||||
RtlCopyMemory(&PrivateDeviceDescription, DeviceDescription,
|
||||
sizeof(DEVICE_DESCRIPTION));
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue