From 9e2e9b97218cae26fe5559cacab5b5fa67aeabeb Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 16 Dec 2014 17:21:14 -0600 Subject: [PATCH] rtl8188eu: Fix compile warnings Signed-off-by: Larry Finger --- os_dep/linux/ioctl_linux.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 69158e9..0e7ea66 100755 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -9228,12 +9228,16 @@ static int rtw_mp_efuse_get(struct net_device *dev, // DBG_871X("0x%02x\t", i); sprintf(extra, "%s0x%02x\t", extra, i); for (j=0; j<8; j++) { + if (i + j >= EFUSE_MAX_MAP_LEN) + continue; // DBG_871X("%02X ", data[i+j]); sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseInitMap[i+j]); } // DBG_871X("\t"); sprintf(extra, "%s\t", extra); for (; j<16; j++) { + if (i + j >= EFUSE_MAX_MAP_LEN) + continue; // DBG_871X("%02X ", data[i+j]); sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseInitMap[i+j]); } @@ -9564,12 +9568,16 @@ static int rtw_mp_efuse_get(struct net_device *dev, // DBG_871X("0x%03x\t", i); sprintf(extra, "%s0x%03x\t", extra, i); for (j=0; j<8; j++) { + if (i + j >= EFUSE_BT_MAX_MAP_LEN) + continue; // DBG_871X("%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]); } // DBG_871X("\t"); sprintf(extra, "%s\t", extra); for (; j<16; j++) { + if (i + j >= EFUSE_BT_MAX_MAP_LEN) + continue; // DBG_871X("%02X ", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]); } @@ -9582,17 +9590,20 @@ static int rtw_mp_efuse_get(struct net_device *dev, { // DBG_871X("OFFSET\tVALUE(hex)\n"); sprintf(extra, "\n"); - for (i=0; i= EFUSE_MAX_MAP_LEN) + continue; // DBG_871X("%02X ", pEfuseHal->fakeEfuseModifiedMap[i+j]); sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]); } // DBG_871X("\t"); sprintf(extra, "%s\t", extra); for (; j<16; j++) { + if (i + j >= EFUSE_MAX_MAP_LEN) + continue; // DBG_871X("%02X ", pEfuseHal->fakeEfuseModifiedMap[i+j]); sprintf(extra, "%s %02X", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]); }