From: Larry Finger Date: Thu, 29 Aug 2013 02:12:25 +0000 (-0500) Subject: staging: r8188eu: Fix compiler warnings in os_dep/ioctl_linux.c X-Git-Tag: v3.12-rc1~183^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40fac5a1322719074312e58273392e9b652c64a1;p=pandora-kernel.git staging: r8188eu: Fix compiler warnings in os_dep/ioctl_linux.c The 0-DAY kernel build testing backend reports the following compiler warnings not shown on my compiler version/options: drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function 'rtw_mp_efuse_get': >> drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:5836:65: warning: iteration 16u invokes undefined behavior [-Waggressive-loop-optimizations] sprintf(extra, "%s%02X ", extra, pEfuseHal->fakeEfuseInitMap[i+j]); ^ drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:5830:3: note: containing loop for (i = 0; i < EFUSE_MAP_SIZE; i += 16) { ^ >> drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:6042:69: warning: iteration 16u invokes undefined behavior [-Waggressive-loop-optimizations] sprintf(extra, "%s %02X", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]); ^ drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:6036:3: note: containing loop for (i = 0; i < EFUSE_MAP_SIZE; i += 16) { ^ The problem is due to improper settings for some of the EFUSE_XXX defines such that EFUSE_MAP_SIZE was larger than the sizes of the marked arrays. Thanks to Fengguang Wu for helping me understand the root cause. Reported-by: Fengguang Wu Signed-off-by: Larry Finger Cc: Fengguang Wu Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed