Silence compiler warnings (7/11).

svn path=/trunk/; revision=37829
This commit is contained in:
Dmitry Gorbachev
2008-12-03 17:33:13 +00:00
parent 120359ef8e
commit ff091bdac5
24 changed files with 38 additions and 36 deletions
+3 -3
View File
@@ -116,7 +116,7 @@ ColorsProc(
break;
}
if (red == -1)
if (red == -1U)
{
red = SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_RED), UDM_GETPOS, 0, 0);
if (HIWORD(red))
@@ -127,7 +127,7 @@ ColorsProc(
red = LOBYTE(red);
}
if (green == -1)
if (green == -1U)
{
green = SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_GREEN), UDM_GETPOS, 0, 0);
if (HIWORD(green))
@@ -138,7 +138,7 @@ ColorsProc(
green = LOBYTE(green);
}
if (blue == -1)
if (blue == -1U)
{
blue = SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_BLUE), UDM_GETPOS, 0, 0);
if (HIWORD(blue))
+1 -1
View File
@@ -160,7 +160,7 @@ LayoutProc(
SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(xres, 0));
SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), UDM_SETRANGE, 0, (LPARAM)MAKELONG(yres, 0));
if (pConInfo->WindowPosition != -1)
if (pConInfo->WindowPosition != -1U)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, LOWORD(pConInfo->WindowPosition), FALSE);
SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, HIWORD(pConInfo->WindowPosition), FALSE);
+1 -1
View File
@@ -969,7 +969,7 @@ OnDrawItem(UINT idCtl,
GetSysColor(COLOR_WINDOWTEXT));
}
if (lpdis->itemID != -1)
if (lpdis->itemID != -1U)
{
CopyRect(&rc, &lpdis->rcItem);
rc.left += 5;
+1 -1
View File
@@ -75,7 +75,7 @@ GetTransmitTime(PTIMEPACKET ptp)
static BOOL
SendData(PINFO pInfo)
{
TIMEPACKET tp = {0,};
TIMEPACKET tp = { 0, 0 };
INT Ret;
ZeroMemory(&pInfo->SendPacket, sizeof(pInfo->SendPacket));
+1 -1
View File
@@ -104,7 +104,7 @@ RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build)
NTSTATUS NTAPI
RtlGetVersion(RTL_OSVERSIONINFOW *Info)
{
ULONG i, MaxLength;
LONG i, MaxLength;
if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) ||
Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
+4 -4
View File
@@ -830,10 +830,10 @@ SearchPathA (
LPSTR *lpFilePart
)
{
UNICODE_STRING PathU = {0};
UNICODE_STRING FileNameU = {0};
UNICODE_STRING ExtensionU = {0};
UNICODE_STRING BufferU = {0};
UNICODE_STRING PathU = { 0, 0, NULL };
UNICODE_STRING FileNameU = { 0, 0, NULL };
UNICODE_STRING ExtensionU = { 0, 0, NULL };
UNICODE_STRING BufferU = { 0, 0, NULL };
ANSI_STRING Path;
ANSI_STRING FileName;
ANSI_STRING Extension;
+1 -1
View File
@@ -479,7 +479,7 @@ SetFilePointer(HANDLE hFile,
*lpDistanceToMoveHigh = FilePosition.CurrentByteOffset.u.HighPart;
}
if (FilePosition.CurrentByteOffset.u.LowPart == -1)
if (FilePosition.CurrentByteOffset.u.LowPart == -1U)
{
/* The value of -1 is valid here, especially when the new
file position is greater than 4 GB. Since NtSetInformationFile
+1 -1
View File
@@ -165,7 +165,7 @@ GetMailslotInfo(HANDLE hMailslot,
if (lpReadTimeout != NULL)
{
if (Buffer.ReadTimeout.LowPart == 0 &&
Buffer.ReadTimeout.HighPart == 0x80000000)
Buffer.ReadTimeout.HighPart == (LONG)0x80000000)
*lpReadTimeout = MAILSLOT_WAIT_FOREVER;
else
*lpReadTimeout = (DWORD)(Buffer.ReadTimeout.QuadPart / -10000);
+1 -1
View File
@@ -952,7 +952,7 @@ GetNamedPipeHandleStateA(HANDLE hNamedPipe,
LPSTR lpUserName,
DWORD nMaxUserNameSize)
{
UNICODE_STRING UserNameW = {0};
UNICODE_STRING UserNameW = { 0, 0, NULL };
ANSI_STRING UserNameA;
BOOL Ret;
+1 -1
View File
@@ -495,7 +495,7 @@ GetVolumeInformationA(
)
{
UNICODE_STRING FileSystemNameU;
UNICODE_STRING VolumeNameU = {0};
UNICODE_STRING VolumeNameU = { 0, 0, NULL };
ANSI_STRING VolumeName;
ANSI_STRING FileSystemName;
PWCHAR RootPathNameW;
+1 -1
View File
@@ -53,7 +53,7 @@ MulDiv(INT nNumber,
/* Do the sign changes */
if ((LONG)Result.LowPart >= 0)
{
return (Negative >= 0) ? Result.LowPart : -(LONG)Result.LowPart;
return (Negative >= 0) ? (LONG)Result.LowPart : -(LONG)Result.LowPart;
}
}
+1 -1
View File
@@ -76,7 +76,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &PROFILE_CritSect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, 0, 0
0, 0, 0, 0, 0
};
static RTL_CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };
+1 -1
View File
@@ -250,7 +250,7 @@ FileTimeToDosDateTime(
{
PDOSTIME pdtime=(PDOSTIME) lpFatTime;
PDOSDATE pddate=(PDOSDATE) lpFatDate;
SYSTEMTIME SystemTime = { 0 };
SYSTEMTIME SystemTime = { 0, 0, 0, 0, 0, 0, 0, 0 };
if ( lpFileTime == NULL )
return FALSE;
+1 -1
View File
@@ -639,7 +639,7 @@ CreateProcessInternalW(HANDLE hToken,
BOOLEAN FoundQuotes = FALSE;
BOOLEAN QuotesNeeded = FALSE;
BOOLEAN CmdLineIsAppName = FALSE;
UNICODE_STRING ApplicationName = {0};
UNICODE_STRING ApplicationName = { 0, 0, NULL };
OBJECT_ATTRIBUTES LocalObjectAttributes;
POBJECT_ATTRIBUTES ObjectAttributes;
HANDLE hSection = NULL, hProcess = NULL, hThread = NULL, hDebug = NULL;
+2 -2
View File
@@ -31,11 +31,11 @@ TlsAlloc(VOID)
/* Try to get regular TEB slot. */
Index = RtlFindClearBitsAndSet(NtCurrentPeb()->TlsBitmap, 1, 0);
if (Index == ~0)
if (Index == ~0U)
{
/* If it fails, try to find expansion TEB slot. */
Index = RtlFindClearBitsAndSet(NtCurrentPeb()->TlsExpansionBitmap, 1, 0);
if (Index != ~0)
if (Index != ~0U)
{
if (NtCurrentTeb()->TlsExpansionSlots == NULL)
{
+1 -1
View File
@@ -14,7 +14,7 @@ typedef struct
NetCfgComponentItem * pProtocol;
} INetCfgImpl, *LPINetCfgImpl;
static LPINetCfgImpl __inline impl_from_INetCfgLock(INetCfgLock *iface)
static __inline LPINetCfgImpl impl_from_INetCfgLock(INetCfgLock *iface)
{
return (INetCfgImpl*)((char *)iface - FIELD_OFFSET(INetCfgImpl, lpVtblLock));
}
+1 -1
View File
@@ -107,7 +107,7 @@ typedef struct
UINT MaxNum;
}TcpipPortSettings;
static LPTcpipConfNotifyImpl __inline impl_from_INetCfgComponentControl(INetCfgComponentControl *iface)
static __inline LPTcpipConfNotifyImpl impl_from_INetCfgComponentControl(INetCfgComponentControl *iface)
{
return (TcpipConfNotifyImpl*)((char *)iface - FIELD_OFFSET(TcpipConfNotifyImpl, lpVtblCompControl));
}
+1 -1
View File
@@ -26,7 +26,7 @@ typedef struct
} INetConnectionImpl, *LPINetConnectionImpl;
static LPINetConnectionManagerImpl __inline impl_from_EnumNetConnection(IEnumNetConnection *iface)
static __inline LPINetConnectionManagerImpl impl_from_EnumNetConnection(IEnumNetConnection *iface)
{
return (LPINetConnectionManagerImpl)((char *)iface - FIELD_OFFSET(INetConnectionManagerImpl, lpVtblNetConnection));
}
+2 -2
View File
@@ -32,12 +32,12 @@ typedef struct
LONG ref;
}INetConnectionPropertyUiImpl, *LPINetConnectionPropertyUiImpl;
static LPINetConnectionPropertyUiImpl __inline impl_from_NetLanConnectionUiInfo(INetLanConnectionUiInfo *iface)
static __inline LPINetConnectionPropertyUiImpl impl_from_NetLanConnectionUiInfo(INetLanConnectionUiInfo *iface)
{
return (LPINetConnectionPropertyUiImpl)((char *)iface - FIELD_OFFSET(INetConnectionPropertyUiImpl, lpLanConUiInfoVtbl));
}
static LPINetConnectionPropertyUiImpl __inline impl_from_NetConnectionConnectUi(INetConnectionConnectUi *iface)
static __inline LPINetConnectionPropertyUiImpl impl_from_NetConnectionConnectUi(INetConnectionConnectUi *iface)
{
return (LPINetConnectionPropertyUiImpl)((char *)iface - FIELD_OFFSET(INetConnectionPropertyUiImpl, lpNetConnectionConnectUi));
}
@@ -79,28 +79,28 @@ static const IObjectWithSiteVtbl vt_ObjectWithSite;
static const IQueryInfoVtbl vt_QueryInfo;
static const IExtractIconWVtbl vt_ExtractIconW;
static LPIContextMenuImpl __inline impl_from_IExtractIcon(IExtractIconW *iface)
static __inline LPIContextMenuImpl impl_from_IExtractIcon(IExtractIconW *iface)
{
return (LPIContextMenuImpl)((char *)iface - FIELD_OFFSET(IContextMenuImpl, lpVtblExtractIconW));
}
static LPIContextMenuImpl __inline impl_from_IObjectWithSite(IObjectWithSite *iface)
static __inline LPIContextMenuImpl impl_from_IObjectWithSite(IObjectWithSite *iface)
{
return (LPIContextMenuImpl)((char *)iface - FIELD_OFFSET(IContextMenuImpl, lpVtblObjectWithSite));
}
static LPIGenericSFImpl __inline impl_from_IPersistFolder2(IPersistFolder2 *iface)
static __inline LPIGenericSFImpl impl_from_IPersistFolder2(IPersistFolder2 *iface)
{
return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2));
}
static LPIGenericSFImpl __inline impl_from_IShellExecuteHookW(IShellExecuteHookW *iface)
static __inline LPIGenericSFImpl impl_from_IShellExecuteHookW(IShellExecuteHookW *iface)
{
return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblShellExecuteHookW));
}
static LPIContextMenuImpl __inline impl_from_IQueryInfo(IQueryInfo *iface)
static __inline LPIContextMenuImpl impl_from_IQueryInfo(IQueryInfo *iface)
{
return (LPIContextMenuImpl)((char *)iface - FIELD_OFFSET(IContextMenuImpl, lpVtblQueryInfo));
}
+3 -3
View File
@@ -21,7 +21,7 @@ static DWORD OPENGL32_RegGetDriverInfo( LPCWSTR driver, GLDRIVERDATA *icd );
/* global vars */
/* Do not assume it have the free value -1 set, any value can be in here */
DWORD OPENGL32_tls = -1;
DWORD OPENGL32_tls = -1U;
GLPROCESSDATA OPENGL32_processdata;
@@ -103,7 +103,7 @@ OPENGL32_ProcessAttach()
TRUE /* bInheritHandle */ };
OPENGL32_tls = TlsAlloc();
if (-1 == OPENGL32_tls)
if (-1U == OPENGL32_tls)
return FALSE;
memset( &OPENGL32_processdata, 0, sizeof (OPENGL32_processdata) );
@@ -179,7 +179,7 @@ OPENGL32_ProcessDetach()
CloseHandle( OPENGL32_processdata.dcdata_mutex );
/* free TLS */
if (OPENGL32_tls != -1)
if (OPENGL32_tls != -1U)
TlsFree(OPENGL32_tls);
}
+1 -1
View File
@@ -169,7 +169,7 @@ CopyDirectory (LPCWSTR lpDestinationPath,
FindClose (hFind);
DPRINT ("Copy Directory() done\n");
DPRINT ("CopyDirectory() done\n");
return TRUE;
}
+1 -1
View File
@@ -912,7 +912,7 @@ LoadUserProfileW(
DWORD UserNameLength = 0, DomainLength = 0;
PTOKEN_USER UserSid = NULL;
SID_NAME_USE AccountType;
UNICODE_STRING SidString = { 0, };
UNICODE_STRING SidString = { 0, 0, NULL };
LONG Error;
BOOL ret = FALSE;
DWORD dwLength = sizeof(szUserHivePath) / sizeof(szUserHivePath[0]);
+2
View File
@@ -114,6 +114,8 @@ InitializeProfiles (VOID)
HKEY hKey;
LONG Error;
DPRINT("InitializeProfiles()\n");
/* Load profiles directory path */
if (!LoadStringW(hInstance,
IDS_PROFILEPATH,