* [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning
@ 2011-12-06 23:37 Simon Glass
2011-12-06 23:37 ` [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c Simon Glass
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Simon Glass @ 2011-12-06 23:37 UTC (permalink / raw)
To: u-boot
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]
Signed-off-by: Simon Glass <sjg@chromium.org>
---
lib/qsort.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/qsort.c b/lib/qsort.c
index 86c392c..5709884 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -16,6 +16,7 @@
* bcc and gcc. */
#include <linux/types.h>
+#include <common.h>
#include <exports.h>
void qsort(void *base,
--
1.7.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c
2011-12-06 23:37 [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Simon Glass
@ 2011-12-06 23:37 ` Simon Glass
2011-12-07 7:42 ` Wolfgang Denk
2011-12-07 3:36 ` [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Kumar Gala
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2011-12-06 23:37 UTC (permalink / raw)
To: u-boot
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]
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/cmd_bdinfo.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 73c03a8..67cb0da 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -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;
--
1.7.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning
2011-12-06 23:37 [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Simon Glass
2011-12-06 23:37 ` [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c Simon Glass
@ 2011-12-07 3:36 ` Kumar Gala
2011-12-07 5:29 ` Simon Glass
2011-12-07 7:08 ` Heiko Schocher
2011-12-07 7:40 ` Wolfgang Denk
3 siblings, 1 reply; 7+ messages in thread
From: Kumar Gala @ 2011-12-07 3:36 UTC (permalink / raw)
To: u-boot
On Dec 6, 2011, at 5:37 PM, Simon Glass wrote:
> 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]
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> lib/qsort.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Acked-by: Kumar Gala <galak@kernel.crashing.org>
---
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning
2011-12-07 3:36 ` [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Kumar Gala
@ 2011-12-07 5:29 ` Simon Glass
0 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2011-12-07 5:29 UTC (permalink / raw)
To: u-boot
Hi Kumar,
On Tue, Dec 6, 2011 at 7:36 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Dec 6, 2011, at 5:37 PM, Simon Glass wrote:
>
>> 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]
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>> lib/qsort.c | ? ?1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> Acked-by: Kumar Gala <galak@kernel.crashing.org>
>
> ---
>
> 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
>
> - k
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning
2011-12-06 23:37 [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Simon Glass
2011-12-06 23:37 ` [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c Simon Glass
2011-12-07 3:36 ` [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Kumar Gala
@ 2011-12-07 7:08 ` Heiko Schocher
2011-12-07 7:40 ` Wolfgang Denk
3 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2011-12-07 7:08 UTC (permalink / raw)
To: u-boot
Hello Simon,
Simon Glass wrote:
> 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]
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Tested on the cam_enc_4xx board:
Tested-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning
2011-12-06 23:37 [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Simon Glass
` (2 preceding siblings ...)
2011-12-07 7:08 ` Heiko Schocher
@ 2011-12-07 7:40 ` Wolfgang Denk
3 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2011-12-07 7:40 UTC (permalink / raw)
To: u-boot
Dear Simon Glass,
In message <1323214637-5543-1-git-send-email-sjg@chromium.org> you wrote:
> 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]
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> lib/qsort.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c
2011-12-06 23:37 ` [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c Simon Glass
@ 2011-12-07 7:42 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2011-12-07 7:42 UTC (permalink / raw)
To: u-boot
Dear Simon Glass,
In message <1323214637-5543-2-git-send-email-sjg@chromium.org> you wrote:
> 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]
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> common/cmd_bdinfo.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-07 7:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 23:37 [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Simon Glass
2011-12-06 23:37 ` [U-Boot] [PATCH 2/2] Fix unused function in cmd_bdinfo.c Simon Glass
2011-12-07 7:42 ` Wolfgang Denk
2011-12-07 3:36 ` [U-Boot] [PATCH 1/2] Include common.h in qsort.c to fix build warning Kumar Gala
2011-12-07 5:29 ` Simon Glass
2011-12-07 7:08 ` Heiko Schocher
2011-12-07 7:40 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox