* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
@ 2012-04-28 22:24 Marek Vasut
2012-04-28 22:24 ` [U-Boot] [PATCH 2/2] GCC47: Fix warning in md5.c Marek Vasut
2012-04-28 22:25 ` [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c Marek Vasut
0 siblings, 2 replies; 8+ messages in thread
From: Marek Vasut @ 2012-04-28 22:24 UTC (permalink / raw)
To: u-boot
cmd_nand.c: In function ???arg_off_size???:
cmd_nand.c:216:5: warning: ???maxsize??? may be used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
---
common/cmd_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index bae630d..0fd3a6c 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[], int *idx,
loff_t *off, loff_t *size)
{
int ret;
- loff_t maxsize;
+ loff_t maxsize = 0;
if (argc == 0) {
*off = 0;
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 2/2] GCC47: Fix warning in md5.c
2012-04-28 22:24 [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c Marek Vasut
@ 2012-04-28 22:24 ` Marek Vasut
2012-04-28 22:25 ` [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c Marek Vasut
1 sibling, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-04-28 22:24 UTC (permalink / raw)
To: u-boot
md5.c: In function ???MD5Final???:
md5.c:156:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
md5.c:157:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
include/u-boot/md5.h | 5 ++++-
lib/md5.c | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/u-boot/md5.h b/include/u-boot/md5.h
index 08924cc..e09c16a 100644
--- a/include/u-boot/md5.h
+++ b/include/u-boot/md5.h
@@ -11,7 +11,10 @@
struct MD5Context {
__u32 buf[4];
__u32 bits[2];
- unsigned char in[64];
+ union {
+ unsigned char in[64];
+ __u32 in32[16];
+ };
};
/*
diff --git a/lib/md5.c b/lib/md5.c
index 81a09e3..2ae4a06 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -153,8 +153,8 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ((__u32 *) ctx->in)[14] = ctx->bits[0];
- ((__u32 *) ctx->in)[15] = ctx->bits[1];
+ ctx->in32[14] = ctx->bits[0];
+ ctx->in32[15] = ctx->bits[1];
MD5Transform(ctx->buf, (__u32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
2012-04-28 22:24 [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c Marek Vasut
2012-04-28 22:24 ` [U-Boot] [PATCH 2/2] GCC47: Fix warning in md5.c Marek Vasut
@ 2012-04-28 22:25 ` Marek Vasut
1 sibling, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-04-28 22:25 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
> cmd_nand.c: In function ???arg_off_size???:
> cmd_nand.c:216:5: warning: ???maxsize??? may be used uninitialized in this
> function [-Wmaybe-uninitialized]
AW CRAP ... ignore this, damn encoding problem.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
> common/cmd_nand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> index bae630d..0fd3a6c 100644
> --- a/common/cmd_nand.c
> +++ b/common/cmd_nand.c
> @@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[],
> int *idx, loff_t *off, loff_t *size)
> {
> int ret;
> - loff_t maxsize;
> + loff_t maxsize = 0;
>
> if (argc == 0) {
> *off = 0;
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
@ 2012-04-28 22:28 Marek Vasut
2012-04-29 12:11 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-04-28 22:28 UTC (permalink / raw)
To: u-boot
cmd_nand.c: In function ?arg_off_size?:
cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
---
common/cmd_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
NOTE: Why does this emit these blahs about UTF8? I just noticed git started
behaving weird on me, anyone can give me a hint how to disable these?
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index bae630d..0fd3a6c 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[], int *idx,
loff_t *off, loff_t *size)
{
int ret;
- loff_t maxsize;
+ loff_t maxsize = 0;
if (argc == 0) {
*off = 0;
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
2012-04-28 22:28 Marek Vasut
@ 2012-04-29 12:11 ` Wolfgang Denk
2012-04-29 13:11 ` Marek Vasut
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2012-04-29 12:11 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <1335652120-2646-1-git-send-email-marex@denx.de> you wrote:
> cmd_nand.c: In function ?arg_off_size?:
> cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
> common/cmd_nand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
> NOTE: Why does this emit these blahs about UTF8? I just noticed git started
> behaving weird on me, anyone can give me a hint how to disable these?
Yes, I think I can: don't use funny characters like these quotes
around "arg_off_size" and "maxsize" in the commit messages. You will
also notice that patchwork has problems with these, like here:
Traceback (most recent call last):
File "/home/wd/bin/pwclient", line 466, in <module>
main()
File "/home/wd/bin/pwclient", line 449, in main
action_apply(rpc, patch_id)
File "/home/wd/bin/pwclient", line 264, in action_apply
proc.communicate(s)
File "/usr/lib64/python2.7/subprocess.py", line 737, in communicate
self.stdin.write(input)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 450: ordinal not in range(128)
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
Anarchy may not be the best form of government, but it's better than
no government at all.
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
2012-04-29 12:11 ` Wolfgang Denk
@ 2012-04-29 13:11 ` Marek Vasut
2012-04-29 18:08 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-04-29 13:11 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
> Dear Marek Vasut,
>
> In message <1335652120-2646-1-git-send-email-marex@denx.de> you wrote:
> > cmd_nand.c: In function ?arg_off_size?:
> > cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this
> > function [-Wmaybe-uninitialized]
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Scott Wood <scottwood@freescale.com>
> > Cc: Wolfgang Denk <wd@denx.de>
> > ---
> >
> > common/cmd_nand.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Applied, thanks.
>
> > NOTE: Why does this emit these blahs about UTF8? I just noticed git
> > started behaving weird on me, anyone can give me a hint how to disable
> > these?
>
> Yes, I think I can: don't use funny characters like these quotes
> around "arg_off_size" and "maxsize" in the commit messages.
Looking closer at it, it's not standard "'" quote character, what the heck. But
$LANG (and $LANGUAGE) is set to en_US.UTF8 . Damned, I'll try to find the root
cause, but I feel like overcomplicated KDE4 combined with who-knows-what will
win this battle :-/
> You will
> also notice that patchwork has problems with these, like here:
>
> Traceback (most recent call last):
> File "/home/wd/bin/pwclient", line 466, in <module>
> main()
> File "/home/wd/bin/pwclient", line 449, in main
> action_apply(rpc, patch_id)
> File "/home/wd/bin/pwclient", line 264, in action_apply
> proc.communicate(s)
> File "/usr/lib64/python2.7/subprocess.py", line 737, in communicate
> self.stdin.write(input)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in
> position 450: ordinal not in range(128)
>
>
>
> Best regards,
>
> Wolfgang Denk
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
2012-04-29 13:11 ` Marek Vasut
@ 2012-04-29 18:08 ` Wolfgang Denk
2012-04-29 18:22 ` Marek Vasut
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2012-04-29 18:08 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201204291511.36960.marex@denx.de> you wrote:
>
> > Yes, I think I can: don't use funny characters like these quotes
> > around "arg_off_size" and "maxsize" in the commit messages.
>
> Looking closer at it, it's not standard "'" quote character, what the heck. But
> $LANG (and $LANGUAGE) is set to en_US.UTF8 . Damned, I'll try to find the root
> cause, but I feel like overcomplicated KDE4 combined with who-knows-what will
> win this battle :-/
I don't know either how to set LC_MESSAGES or even LC_ALL or anything
else to prevent gcc from issuing such characters; so I guess we have
to maually filter/convert any such messages instead of just copy &
paste error messages ...
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
All I ask is a chance to prove that money can't make me happy.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c
2012-04-29 18:08 ` Wolfgang Denk
@ 2012-04-29 18:22 ` Marek Vasut
0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-04-29 18:22 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
> Dear Marek Vasut,
>
> In message <201204291511.36960.marex@denx.de> you wrote:
> > > Yes, I think I can: don't use funny characters like these quotes
> > > around "arg_off_size" and "maxsize" in the commit messages.
> >
> > Looking closer at it, it's not standard "'" quote character, what the
> > heck. But $LANG (and $LANGUAGE) is set to en_US.UTF8 . Damned, I'll try
> > to find the root cause, but I feel like overcomplicated KDE4 combined
> > with who-knows-what will win this battle :-/
>
> I don't know either how to set LC_MESSAGES or even LC_ALL or anything
> else to prevent gcc from issuing such characters; so I guess we have
> to maually filter/convert any such messages instead of just copy &
> paste error messages ...
Yes, I agree ... I'll keep my eyes peeled.
> Best regards,
>
> Wolfgang Denk
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-04-29 18:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-28 22:24 [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c Marek Vasut
2012-04-28 22:24 ` [U-Boot] [PATCH 2/2] GCC47: Fix warning in md5.c Marek Vasut
2012-04-28 22:25 ` [U-Boot] [PATCH 1/2] GCC47: Fix warning in cmd_nand.c Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2012-04-28 22:28 Marek Vasut
2012-04-29 12:11 ` Wolfgang Denk
2012-04-29 13:11 ` Marek Vasut
2012-04-29 18:08 ` Wolfgang Denk
2012-04-29 18:22 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox