]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: xgifb: Initialize uninitialized variables
authorJavier Martinez Canillas <martinez.javier@gmail.com>
Tue, 7 Sep 2010 05:34:05 +0000 (01:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Sep 2010 06:18:18 +0000 (23:18 -0700)
Current patch solves compilation warnings in staging/xgifb for using
possibly uninitialized variables.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/vb_setmode.c

index c4db2fc6dda845f8fe4f1304bd4d342e58c144fd..720a592c9e63369694b3b1290ae39d89d407a487 100644 (file)
@@ -376,7 +376,7 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
 unsigned char XGISetModeNew(struct xgi_hw_device_info *HwDeviceExtension,
                        unsigned short ModeNo)
 {
-       unsigned short ModeIdIndex;
+       unsigned short ModeIdIndex = 0;
        /* unsigned char *pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress; */
        struct vb_device_info VBINF;
        struct vb_device_info *pVBInfo = &VBINF;
@@ -3834,7 +3834,7 @@ unsigned char XGI_SetCRT2Group301(unsigned short ModeNo,
                struct xgi_hw_device_info *HwDeviceExtension,
                struct vb_device_info *pVBInfo)
 {
-       unsigned short tempbx, ModeIdIndex, RefreshRateTableIndex;
+       unsigned short tempbx, ModeIdIndex = 0, RefreshRateTableIndex;
 
        tempbx = pVBInfo->VBInfo;
        pVBInfo->SetFlag |= ProgrammingCRT2;