Avoid warnings when using gcc 3.4

svn path=/trunk/; revision=9350
This commit is contained in:
Gé van Geldorp 2004-05-10 18:02:20 +00:00
parent 2fbb38750c
commit 1b645d2622
8 changed files with 50 additions and 50 deletions

View file

@ -1,4 +1,4 @@
/* $Id: blue.c,v 1.44 2004/02/10 16:22:55 navaraf Exp $
/* $Id: blue.c,v 1.45 2004/05/10 18:02:19 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -471,7 +471,7 @@ ScrIoControl(PDEVICE_OBJECT DeviceObject,
for (dwCount = 0; dwCount < stk->Parameters.DeviceIoControl.OutputBufferLength; dwCount++, pAttr++)
{
(char) *pAttr = vidmem[offset + (dwCount * 2)];
*((char *) pAttr) = vidmem[offset + (dwCount * 2)];
}
Buf->dwTransfered = dwCount;

View file

@ -216,7 +216,8 @@ FloppyDpcReadWrite (PKDPC Dpc,
Stack->Parameters.Read.Length -= ControllerExtension->TransferLength;
/* drivercontext used for current va */
(ULONG)ControllerExtension->Irp->Tail.Overlay.DriverContext[0] += ControllerExtension->TransferLength;
ControllerExtension->Irp->Tail.Overlay.DriverContext[0] = (PVOID) ((ULONG) ControllerExtension->Irp->Tail.Overlay.DriverContext[0]
+ ControllerExtension->TransferLength);
DPRINT ("First ulong: %x\n", *((PULONG)ControllerExtension->MapRegisterBase))
/* If there is more IO to be done, restart execute routine to issue next read */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: class2.c,v 1.52 2004/04/01 17:29:53 jimtabor Exp $
/* $Id: class2.c,v 1.53 2004/05/10 18:02:20 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1380,9 +1380,9 @@ ScsiClassIoComplete(IN PDEVICE_OBJECT DeviceObject,
/* Retry the request */
if ((Retry) &&
((ULONG)IrpStack->Parameters.Others.Argument4 > 0))
((ULONG_PTR)IrpStack->Parameters.Others.Argument4 > 0))
{
((ULONG)IrpStack->Parameters.Others.Argument4)--;
IrpStack->Parameters.Others.Argument4 = (PVOID) ((ULONG_PTR)IrpStack->Parameters.Others.Argument4 - 1);
ScsiClassRetryRequest(DeviceObject,
Irp,
@ -1502,9 +1502,9 @@ ScsiClassIoCompleteAssociated(IN PDEVICE_OBJECT DeviceObject,
/* Retry the request */
if ((Retry) &&
((ULONG)IrpStack->Parameters.Others.Argument4 > 0))
((ULONG_PTR)IrpStack->Parameters.Others.Argument4 > 0))
{
((ULONG)IrpStack->Parameters.Others.Argument4)--;
IrpStack->Parameters.Others.Argument4 = (PVOID) ((ULONG_PTR)IrpStack->Parameters.Others.Argument4 - 1);
ScsiClassRetryRequest(DeviceObject,
Irp,

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: disk.c,v 1.40 2004/04/01 17:24:47 jimtabor Exp $
/* $Id: disk.c,v 1.41 2004/05/10 18:02:20 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1186,8 +1186,7 @@ DiskClassDeviceControl(IN PDEVICE_OBJECT DeviceObject,
Information = 0;
if (OutputLength != 0)
{
((PULONG)(Irp->AssociatedIrp.SystemBuffer)) =
DeviceExtension->MediaChangeCount;
Irp->AssociatedIrp.SystemBuffer = (PVOID) DeviceExtension->MediaChangeCount;
Information = sizeof(ULONG);
}

View file

@ -117,7 +117,7 @@ template<typename BASE> struct IComSrvQI : public BASE
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0;
if (IsEqualIID(riid, _uuid_base) ||
IsEqualIID(riid, IID_IUnknown)) {*ppv=static_cast<BASE*>(this); AddRef(); return S_OK;}
IsEqualIID(riid, IID_IUnknown)) {*ppv=static_cast<BASE*>(this); this->AddRef(); return S_OK;}
return E_NOINTERFACE;}
protected:
@ -158,7 +158,7 @@ template<typename T> struct ConnectionPoint : public SIfacePtr<T>
{
ConnectionPoint(IConnectionPointContainer* pCPC, REFIID riid)
{
CheckError(pCPC->FindConnectionPoint(riid, &_p));
CheckError(pCPC->FindConnectionPoint(riid, &this->_p));
}
};

View file

@ -544,11 +544,11 @@ template<typename BASE> struct ResizeController : public BASE
virtual void GetClientSpace(PRECT prect)
{
if (!IsIconic(_hwnd)) {
GetClientRect(_hwnd, prect);
if (!IsIconic(this->_hwnd)) {
GetClientRect(this->_hwnd, prect);
} else {
WINDOWPLACEMENT wp;
GetWindowPlacement(_hwnd, &wp);
GetWindowPlacement(this->_hwnd, &wp);
prect->left = prect->top = 0;
prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left-
2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE));
@ -632,7 +632,7 @@ template<typename BASE> struct OwnerDrawParent : public BASE
switch(nmsg) {
case WM_DRAWITEM:
if (wparam) { // should there be drawn a control?
HWND hctl = GetDlgItem(_hwnd, wparam);
HWND hctl = GetDlgItem(this->_hwnd, wparam);
if (hctl)
return SendMessage(hctl, PM_DISPATCH_DRAWITEM, wparam, lparam);

View file

@ -295,7 +295,7 @@ struct String_from_XML_Char : public String
inline bool operator==(const String& s1, const char* s2)
{
LPCWSTR p = s1;
const char* q = s2;
const unsigned char* q = (const unsigned char *) s2;
while(*p && *q)
if (*p++ != *q++)

View file

@ -1,4 +1,4 @@
# $Id: helper.mk,v 1.60 2004/03/10 15:22:44 silverblade Exp $
# $Id: helper.mk,v 1.61 2004/05/10 18:02:19 gvg Exp $
#
# Helper makefile for ReactOS modules
# Variables this makefile accepts:
@ -122,8 +122,8 @@ ifeq ($(TARGET_TYPE),program)
MK_DDKLIBS :=
MK_SDKLIBS :=
ifneq ($(WINE_MODE),yes)
MK_CFLAGS := -I./
MK_CPPFLAGS := -I./
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
else
MK_CFLAGS := -I$(PATH_TO_TOP)/include/wine
MK_CPPFLAGS := -I$(PATH_TO_TOP)/include/wine
@ -150,8 +150,8 @@ ifeq ($(TARGET_TYPE),proglib)
MK_DEFENTRY := _WinMain@16
MK_DDKLIBS :=
MK_SDKLIBS :=
MK_CFLAGS := -I./
MK_CPPFLAGS := -I./
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(SDK_PATH_LIB)
@ -170,11 +170,11 @@ ifeq ($(TARGET_TYPE),dynlink)
MK_DDKLIBS :=
MK_SDKLIBS :=
ifneq ($(WINE_MODE),yes)
MK_CFLAGS := -I./
MK_CPPFLAGS := -I./
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
else
MK_CFLAGS := -I$(PATH_TO_TOP)/include/wine -I./ -I$(WINE_INCLUDE)
MK_CPPFLAGS := -I$(PATH_TO_TOP)/include/wine -I./ -I$(WINE_INCLUDE)
MK_CFLAGS := -I$(PATH_TO_TOP)/include/wine -I. -I$(WINE_INCLUDE)
MK_CPPFLAGS := -I$(PATH_TO_TOP)/include/wine -I. -I$(WINE_INCLUDE)
MK_RCFLAGS := --include-dir $(PATH_TO_TOP)/include/wine --include-dir $(WINE_INCLUDE)
endif
MK_IMPLIB := yes
@ -199,8 +199,8 @@ ifeq ($(TARGET_TYPE),library)
MK_DEFENTRY :=
MK_DDKLIBS :=
MK_SDKLIBS :=
MK_CFLAGS := -I./
MK_CPPFLAGS := -I./
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
MK_IMPLIB := no
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH :=
@ -215,8 +215,8 @@ ifeq ($(TARGET_TYPE),kmlibrary)
TARGET_NORC := yes
MK_MODE := static
MK_DEFEXT := .a
MK_CFLAGS := -I./
MK_CPPFLAGS := -I./
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
MK_IMPLIB := no
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
@ -229,8 +229,8 @@ ifeq ($(TARGET_TYPE),driver_library)
MK_DEFENTRY :=
MK_DDKLIBS :=
MK_SDKLIBS :=
MK_CFLAGS := -I./
MK_CPPFLAGS := -I./
MK_CFLAGS := -I.
MK_CPPFLAGS := -I.
MK_IMPLIB := no
MK_IMPLIBONLY := yes
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
@ -248,8 +248,8 @@ ifeq ($(TARGET_TYPE),driver)
MK_DEFENTRY := _DriverEntry@8
MK_DDKLIBS := ntoskrnl.a hal.a
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := no
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH :=
@ -267,8 +267,8 @@ ifeq ($(TARGET_TYPE),export_driver)
MK_DEFENTRY := _DriverEntry@8
MK_DDKLIBS := ntoskrnl.a hal.a
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
@ -286,8 +286,8 @@ ifeq ($(TARGET_TYPE),hal)
MK_DEFENTRY := _DriverEntry@8
MK_DDKLIBS := ntoskrnl.a
MK_SDKLIBS :=
MK_CFLAGS := -D__NTHAL__ -I./
MK_CPPFLAGS := -D__NTHAL__ -I./
MK_CFLAGS := -D__NTHAL__ -I.
MK_CPPFLAGS := -D__NTHAL__ -I.
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH :=
@ -305,8 +305,8 @@ ifeq ($(TARGET_TYPE),bootpgm)
MK_DEFENTRY := _DriverEntry@8
MK_DDKLIBS :=
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := no
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH :=
@ -324,8 +324,8 @@ ifeq ($(TARGET_TYPE),miniport)
MK_DEFENTRY := _DriverEntry@8
MK_DDKLIBS :=
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := no
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH :=
@ -343,8 +343,8 @@ ifeq ($(TARGET_TYPE),gdi_driver)
MK_DEFENTRY := _DrvEnableDriver@12
MK_DDKLIBS := ntoskrnl.a hal.a win32k.a
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
@ -407,8 +407,8 @@ ifeq ($(TARGET_TYPE),subsystem)
MK_DEFENTRY := _DriverEntry@8
MK_DDKLIBS := ntoskrnl.a hal.a
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
@ -425,8 +425,8 @@ ifeq ($(TARGET_TYPE),kmdll)
MK_DEFENTRY := 0x0
MK_DDKLIBS := ntoskrnl.a hal.a
MK_SDKLIBS :=
MK_CFLAGS := -D__NTDRIVER__ -I./
MK_CPPFLAGS := -D__NTDRIVER__ -I./
MK_CFLAGS := -D__NTDRIVER__ -I.
MK_CPPFLAGS := -D__NTDRIVER__ -I.
MK_IMPLIB := yes
MK_IMPLIBONLY := no
MK_IMPLIBDEFPATH := $(DDK_PATH_LIB)
@ -445,7 +445,7 @@ ifeq ($(TARGET_TYPE),winedll)
MK_DEFENTRY := _DllMain@12
MK_DDKLIBS :=
MK_SDKLIBS :=
MK_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -DCOBJMACROS -I$(PATH_TO_TOP)/include/wine
MK_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D_STDDEF_H -DCOBJMACROS -I$(PATH_TO_TOP)/include/wine
MK_CPPFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -DCOBJMACROS -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/include/wine
MK_RCFLAGS := --define __USE_W32API --include-dir $(PATH_TO_TOP)/include/wine
MK_IMPLIB := yes