Include common.h in qsort.c to fix build warning
PATCH 1/2 Include common.h in qsort.c to fix build warning
exports.h no longer includes common.h, which contains assert(). qsort.c needs to be updated. This fixes this warning:
qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert' [-Wimplicit-function-declaration]
--- lib/qsort.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
lib/qsort.c +1 -0
@@ -16,6 +16,7 @@* bcc and gcc. */ #include <linux/types.h> +#include <common.h> #include <exports.h> void qsort(void *base,
Signature · 1 line
1.7.3.1
PATCH 2/2 Fix unused function in cmd_bdinfo.c
It is fine to use __maybe_unused instead of #ifdef, but we also need one for print_eth() since not all boards have Ethernet. This fixes this warning:
cmd_bdinfo.c:39:13: warning: 'print_eth' defined but not used [-Wunused-function]
--- common/cmd_bdinfo.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
common/cmd_bdinfo.c +1 -0
@@ -36,6 +36,7 @@ static void print_num(const char *name, ulong value)printf ("%-12s= 0x%08lX\n" , name, value); } +__maybe_unused static void print_eth (int idx) {char name[10 ], *val;
Signature · 1 line
1.7.3.1
Wolfgang Denk
AppliedPATCH 2/2 Fix unused function in cmd_bdinfo.c
Dear Simon Glass,
Quoted 10 lines · In message <[email protected]> you wrote:
It is fine to use
__maybe_unusedinstead of #ifdef, but we also need one forprint_eth()since not all boards have Ethernet. This fixes this warning:cmd_bdinfo.c:39:13: warning: '
print_eth' defined but not used [-Wunused-function]Signed-off-by Simon Glass <[email protected]>--- common/cmd_bdinfo.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
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 If I had to live my life again, I'd make the same mistakes, only sooner. -- Tallulah Bankhead
PATCH 1/2 Include common.h in qsort.c to fix build warning
In reply to Simon GlassQuoted 10 lines · Simon Glass
exports.hno longer includescommon.h, which containsassert().qsort.cneeds to be updated. This fixes this warning:
qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert' [-Wimplicit-function-declaration]Signed-off-by Simon Glass <[email protected]>---
lib/qsort.c| 1 +1 files changed, 1 insertions(+), 0 deletions(-)
---
w/o this we actually have compile failure with the tree:
In file included from qsort.c:19:0:
/local/home/galak/git/u-boot/include/exports.h:19:27: error: expected declaration specifiers or '...' before 'va_list' qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert'
- k
PATCH 1/2 Include common.h in qsort.c to fix build warning
Hi Kumar,
Quoted 16 lines · Kumar Gala
Quoted 10 lines · Simon Glass
exports.hno longer includescommon.h, which containsassert().qsort.cneeds to be updated. This fixes this warning:
qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert' [-Wimplicit-function-declaration]Signed-off-by Simon Glass <[email protected]>---
lib/qsort.c| ? ?1 +1 files changed, 1 insertions(+), 0 deletions(-)Acked-by Kumar Gala <[email protected]>
Quoted 9 lines
---
w/o this we actually have compile failure with the tree:
In file included from qsort.c:19:0:
/local/home/galak/git/u-boot/include/exports.h:19:27: error: expected declaration specifiers or '...' before 'va_list'qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert'
Yes I was trying to be polite :-)
Regards,
Simon
Quoted 2 lines
- k
PATCH 1/2 Include common.h in qsort.c to fix build warning
In reply to Simon GlassHello Simon,
Quoted 7 lines · Simon Glass
exports.hno longer includescommon.h, which containsassert().qsort.cneeds to be updated. This fixes this warning:
qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert' [-Wimplicit-function-declaration]Signed-off-by Simon Glass <[email protected]>
Tested on the cam_enc_4xx board:
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Wolfgang Denk
AppliedPATCH 1/2 Include common.h in qsort.c to fix build warning
In reply to Simon GlassDear Simon Glass,
Quoted 10 lines · In message <[email protected]> you wrote:
exports.hno longer includescommon.h, which containsassert().qsort.cneeds to be updated. This fixes this warning:
qsort.c: In function 'qsort':
qsort.c:30:3: warning: implicit declaration of function 'assert' [-Wimplicit-function-declaration]Signed-off-by Simon Glass <[email protected]>--- lib/qsort.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
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 "Language shapes the way we think, and determines what we can think about." - B. L. Whorf