diff options
author | Andrew MacIsaac <macisaac.andrew@gmail.com> | 2010-12-29 12:15:48 -0800 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-12-29 22:16:28 +0100 |
commit | 50e79d60ce148f86bc93cc3248c3f6f0f81b3c3e (patch) | |
tree | d22956ad0501c535e41ea89b77bed6209596a219 /src/flash/nor | |
parent | eea91f71f918caa5e4ef571c76f60c579533b0f6 (diff) | |
download | openocd+libswd-50e79d60ce148f86bc93cc3248c3f6f0f81b3c3e.tar.gz openocd+libswd-50e79d60ce148f86bc93cc3248c3f6f0f81b3c3e.tar.bz2 openocd+libswd-50e79d60ce148f86bc93cc3248c3f6f0f81b3c3e.tar.xz openocd+libswd-50e79d60ce148f86bc93cc3248c3f6f0f81b3c3e.zip |
Compilation Warnings on OS X 10.5
I received a number of "-Wshadow" related warnings (treated as errors) while
trying to build on OS X Leopard. In addition, there were two miscellaneous
other warnings in the flash drivers. Attached are two patches which correct
these issues and the commit messages to accompany them.
My system has the following configuration (taken from uname -a):
Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;
root:xnu-1228.15.4~1/RELEASE_I386 i386
=== Werror_patch.txt Commit Message ===
compilation: fixes for -Wshadow warnings on OS X
These changes fix -Wshadow compilation warnings on OS X 10.5.8
Compiled with the following configure command:
../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink
--enable-ft2232_libftdi
=== flash_patch.txt Commit Message ===
compilation: fixes for flash driver warnings on OS X
These changes fix two compilation warnings on OS X 10.5.8:
../../../../src/flash/nor/at91sam3.c:2767: warning: redundant redeclaration
of 'at91sam3_flash'
../../../../src/flash/nor/at91sam3.c:101: warning: previous declaration of
'at91sam3_flash' was here
and
../../../../src/flash/nor/stmsmi.c:205: warning: format not a string literal
and no format arguments
Compiled with the following configure command:
../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink
--enable-ft2232_libftdi
===
Andrew
Diffstat (limited to 'src/flash/nor')
-rw-r--r-- | src/flash/nor/lpc2900.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stmsmi.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c index 1c1c90fd..7bb9f141 100644 --- a/src/flash/nor/lpc2900.c +++ b/src/flash/nor/lpc2900.c @@ -184,7 +184,7 @@ static uint32_t lpc2900_run_bist128(struct flash_bank *bank, uint32_t addr_from, uint32_t addr_to, uint32_t (*signature)[4] ); static uint32_t lpc2900_address2sector(struct flash_bank *bank, uint32_t offset); -static uint32_t lpc2900_calc_tr( uint32_t clock, uint32_t time ); +static uint32_t lpc2900_calc_tr(uint32_t clock_var, uint32_t time_var); /*********************** Helper functions **************************/ diff --git a/src/flash/nor/stmsmi.c b/src/flash/nor/stmsmi.c index c9a16726..d298b368 100644 --- a/src/flash/nor/stmsmi.c +++ b/src/flash/nor/stmsmi.c @@ -202,7 +202,7 @@ FLASH_BANK_COMMAND_HANDLER(stmsmi_flash_bank_command) { struct stmsmi_flash_bank *stmsmi_info; - LOG_DEBUG(__FUNCTION__); + LOG_DEBUG("%s", __FUNCTION__); if (CMD_ARGC < 6) { |