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