mirror of
https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git
synced 2024-11-27 03:47:48 +08:00
e1281d4de9
When building with -Werror=strict-aliasing error is thrown:
mmc_cmds.c: In function 'do_ffu':
mmc_cmds.c:2972:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
sect_done = htole32(*((__u32 *)&ext_csd[EXT_CSD_NUM_OF_FW_SEC_PROG_0]));
^
cc1: all warnings being treated as errors
Let's fix type-punned breaking strict-aliasing by implementing local
per_byte_htole32(__u8 *) and use it for the 2 present occurences of
htole32(). Let's also change sect_done type to __u32 for consistency.
Suggested-by: Avri Altman <Avri.Altman@wdc.com>
Fixes:
|
||
---|---|---|
3rdparty/hmac_sha | ||
man | ||
.gitignore | ||
Android.mk | ||
lsmmc.c | ||
Makefile | ||
mmc_cmds.c | ||
mmc_cmds.h | ||
mmc.c | ||
mmc.h | ||
README |
MMC tools (mmc-utils) ===================== mmc-utils is a tool for configuring MMC storage devices from userspace. Contribution guidelines ----------------------- The project works using a mailing list patch submission process, similar to the process used for the Linux kernel itself. One can document themselves by reading how to submit a patch in the official Linux kernel documentation: https://www.kernel.org/doc/html/latest/process/submitting-patches.html Not all sections apply but it should be a good way to get started. A patch should be sent as a mail (not as an attachement, see documentation above) to the linux-mmc@vger.kernel.org mailing list with maintainers as Cc recipients. Maintainers ----------- Avri Altman <avri.altman@wdc.com> Ulf Hansson <ulf.hansson@linaro.org> License ------- This project is licensed under GPL-2.0-only.