common: env_common: make env_get_char_spec __weak
PATCH 1/1 common: env_common: make env_get_char_spec __weak
---
yup another clang warning:
common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function] static uchar __env_get_char_spec(int index)
^ --- common/env_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
common/env_common.c +1 -3
@@ -27,12 +27,10 @@ struct hsearch_data env_htab = { .change_ok = env_flags_validate, }; -static uchar __env_get_char_spec (int index) +__weak uchar env_get_char_spec (int index) {return *((uchar *)(gd->env_addr + index)); } -uchar env_get_char_spec (int ) - __attribute__((weak,alias ("__env_get_char_spec" )));static uchar env_get_char_init (int index) {
Signature · 1 line
1.8.3.2
PATCH 1/1 common: env_common: make env_get_char_spec __weak
Hi Jeroen,
Quoted 18 lines · Jeroen Hofstee
---
yup another clang warning:
common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function] static uchar__env_get_char_spec(int index)^ --- common/env_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)common/env_common.c +0
-0@@ -27,12 +27,10 @@ struct hsearch_data env_htab = { .change_ok = env_flags_validate, };
common/env_common.c struct hsearch_data env_htab = { · line 36
Quoted 10 lines
common/env_common.c +1
-3-static uchar __env_get_char_spec (int index) +__weak uchar env_get_char_spec (int index) {return *((uchar *)(gd->env_addr + index)); } -uchar env_get_char_spec (int ) - __attribute__((weak,alias ("__env_get_char_spec" )));static uchar env_get_char_init (int index) {
signed-off is missing?
Regards,
Jeroen
PATCH 1/1 common: env_common: make env_get_char_spec __weak
In reply to Jeroen HofsteeDear Jeroen,
common/env_common.c struct hsearch_data env_htab = { · line 30
Quoted 3 lines · In message <[email protected]> you wrote:
common/env_common.c +1
-1-static uchar __env_get_char_spec (int index) +__weak uchar env_get_char_spec (int index)
__weak static ... ?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Experience is what causes a person to make new mistakes instead of old ones.
PATCH 1/1 common: env_common: make env_get_char_spec __weak
Hello Wolfgang,
Quoted 7 lines · Wolfgang Denk
Dear Jeroen,
common/env_common.c struct hsearch_data env_htab = { · line 30
Quoted 3 lines · In message <[email protected]> you wrote:
common/env_common.c +1
-1-static uchar __env_get_char_spec (int index) +__weak uchar env_get_char_spec (int index)
__weakstatic ... ?
tempting huh, but it is the patch format with tricks you in thinking that. The weak is actually added to the function without the leading underscores, a couple of lines below (which wasn't static and shouldn't become so).
Regards,
Jeroen
PATCH 1/1 common: env_common: make env_get_char_spec __weak
Dear Jeroen Hofstee,
Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 4 lines
common/env_common.c struct hsearch_data env_htab = { · line 30
Quoted 3 lines
common/env_common.c +1
-1-static uchar __env_get_char_spec (int index) +__weak uchar env_get_char_spec (int index)
__weakstatic ... ?tempting huh, but it is the patch format with tricks you in thinking that. The weak is actually added to the function without the leading underscores, a couple of lines below (which wasn't static and shouldn't become so).
Argh. You are right.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Sometimes, too long is too long. - Joe Crowe
PATCH v2 1/1 common: env_common: make env_get_char_spec __weak
In reply to Jeroen Hofstee---
yup another clang warning:
common/env_common.c:30:14: warning: unused function '__env_get_char_spec' [-Wunused-function] static uchar __env_get_char_spec(int index)
^
changes since v1:
add missing S-O-B line
--- common/env_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
common/env_common.c +1 -3
@@ -27,12 +27,10 @@ struct hsearch_data env_htab = { .change_ok = env_flags_validate, }; -static uchar __env_get_char_spec (int index) +__weak uchar env_get_char_spec (int index) {return *((uchar *)(gd->env_addr + index)); } -uchar env_get_char_spec (int ) - __attribute__((weak,alias ("__env_get_char_spec" )));static uchar env_get_char_init (int index) {
Signature · 1 line
1.8.3.2
PATCH v2 1/1 common: env_common: make env_get_char_spec __weak
Quoted 1 line · Jeroen Hofstee
Signed-off-by Jeroen Hofstee <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140721/d5d91eef/attachment.pgp>