* [PATCH] Fix compilation warning
@ 2008-02-20 8:07 Bernhard Walle
2008-02-21 9:21 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Walle @ 2008-02-20 8:07 UTC (permalink / raw)
To: kexec
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
purgatory/purgatory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/purgatory/purgatory.c
+++ b/purgatory/purgatory.c
@@ -18,7 +18,7 @@ void verify_sha256_digest(void)
sha256_starts(&ctx);
end = &sha256_regions[sizeof(sha256_regions)/sizeof(sha256_regions[0])];
for(ptr = sha256_regions; ptr < end; ptr++) {
- sha256_update(&ctx, ptr->start, ptr->len);
+ sha256_update(&ctx, (uint8_t *)ptr->start, ptr->len);
}
sha256_finish(&ctx, digest);
if (memcmp(digest, sha256_digest, sizeof(digest)) != 0) {
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Fix compilation warning
2008-02-20 8:07 [PATCH] Fix compilation warning Bernhard Walle
@ 2008-02-21 9:21 ` Simon Horman
2008-02-21 9:28 ` Bernhard Walle
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2008-02-21 9:21 UTC (permalink / raw)
To: kexec
On Wed, Feb 20, 2008 at 09:07:55AM +0100, Bernhard Walle wrote:
> This patch fixes following compilation warning:
>
> purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
>
Thanks Bernhard, I have queued that up.
Although I notice that on arm the warning turns into
purgatory/purgatory.c: In function 'verify_sha256_digest':
purgatory/purgatory.c:21: warning: cast to pointer from integer of different size
--
Horms
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix compilation warning
2008-02-21 9:21 ` Simon Horman
@ 2008-02-21 9:28 ` Bernhard Walle
2008-02-22 9:02 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Walle @ 2008-02-21 9:28 UTC (permalink / raw)
To: kexec
* Simon Horman <horms@verge.net.au> [2008-02-21 10:21]:
> On Wed, Feb 20, 2008 at 09:07:55AM +0100, Bernhard Walle wrote:
> > This patch fixes following compilation warning:
> >
> > purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
> >
>
> Thanks Bernhard, I have queued that up.
> Although I notice that on arm the warning turns into
>
> purgatory/purgatory.c: In function 'verify_sha256_digest':
> purgatory/purgatory.c:21: warning: cast to pointer from integer of different size
Isn't this the case on every 32 bit system?
Bernhard
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Fix compilation warning
2008-02-21 9:28 ` Bernhard Walle
@ 2008-02-22 9:02 ` Simon Horman
2008-02-26 7:58 ` Bernhard Walle
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2008-02-22 9:02 UTC (permalink / raw)
To: kexec
On Thu, Feb 21, 2008 at 10:28:33AM +0100, Bernhard Walle wrote:
> * Simon Horman <horms@verge.net.au> [2008-02-21 10:21]:
> > On Wed, Feb 20, 2008 at 09:07:55AM +0100, Bernhard Walle wrote:
> > > This patch fixes following compilation warning:
> > >
> > > purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
> > >
> >
> > Thanks Bernhard, I have queued that up.
> > Although I notice that on arm the warning turns into
> >
> > purgatory/purgatory.c: In function 'verify_sha256_digest':
> > purgatory/purgatory.c:21: warning: cast to pointer from integer of different size
>
> Isn't this the case on every 32 bit system?
Yes, now you mention it, I expect so. I guess its not a problem.
--
Horms
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix compilation warning
2008-02-22 9:02 ` Simon Horman
@ 2008-02-26 7:58 ` Bernhard Walle
2008-02-27 3:44 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Walle @ 2008-02-26 7:58 UTC (permalink / raw)
To: kexec
* Simon Horman <horms@verge.net.au> [2008-02-22 10:02]:
> On Thu, Feb 21, 2008 at 10:28:33AM +0100, Bernhard Walle wrote:
> > * Simon Horman <horms@verge.net.au> [2008-02-21 10:21]:
> > > On Wed, Feb 20, 2008 at 09:07:55AM +0100, Bernhard Walle wrote:
> > > > This patch fixes following compilation warning:
> > > >
> > > > purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
> > > >
> > >
> > > Thanks Bernhard, I have queued that up.
> > > Although I notice that on arm the warning turns into
> > >
> > > purgatory/purgatory.c: In function 'verify_sha256_digest':
> > > purgatory/purgatory.c:21: warning: cast to pointer from integer of different size
> >
> > Isn't this the case on every 32 bit system?
>
> Yes, now you mention it, I expect so. I guess its not a problem.
But you didn't merge the patch. ;) Here's a version that should not
give any warnings ...
----------------------------
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
purgatory/purgatory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/purgatory/purgatory.c
+++ b/purgatory/purgatory.c
@@ -18,7 +18,7 @@ void verify_sha256_digest(void)
sha256_starts(&ctx);
end = &sha256_regions[sizeof(sha256_regions)/sizeof(sha256_regions[0])];
for(ptr = sha256_regions; ptr < end; ptr++) {
- sha256_update(&ctx, ptr->start, ptr->len);
+ sha256_update(&ctx, (uint8_t *)((uintptr_t)ptr->start), ptr->len);
}
sha256_finish(&ctx, digest);
if (memcmp(digest, sha256_digest, sizeof(digest)) != 0) {
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Fix compilation warning
2008-02-26 7:58 ` Bernhard Walle
@ 2008-02-27 3:44 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2008-02-27 3:44 UTC (permalink / raw)
To: kexec
On Tue, Feb 26, 2008 at 08:58:35AM +0100, Bernhard Walle wrote:
> * Simon Horman <horms@verge.net.au> [2008-02-22 10:02]:
> > On Thu, Feb 21, 2008 at 10:28:33AM +0100, Bernhard Walle wrote:
> > > * Simon Horman <horms@verge.net.au> [2008-02-21 10:21]:
> > > > On Wed, Feb 20, 2008 at 09:07:55AM +0100, Bernhard Walle wrote:
> > > > > This patch fixes following compilation warning:
> > > > >
> > > > > purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
> > > > >
> > > >
> > > > Thanks Bernhard, I have queued that up.
> > > > Although I notice that on arm the warning turns into
> > > >
> > > > purgatory/purgatory.c: In function 'verify_sha256_digest':
> > > > purgatory/purgatory.c:21: warning: cast to pointer from integer of different size
> > >
> > > Isn't this the case on every 32 bit system?
> >
> > Yes, now you mention it, I expect so. I guess its not a problem.
>
> But you didn't merge the patch. ;) Here's a version that should not
> give any warnings ...
Sorry, I had queued it up awaiting the release. I now have applied this
updated fix in git.
--
Horms
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-27 3:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20 8:07 [PATCH] Fix compilation warning Bernhard Walle
2008-02-21 9:21 ` Simon Horman
2008-02-21 9:28 ` Bernhard Walle
2008-02-22 9:02 ` Simon Horman
2008-02-26 7:58 ` Bernhard Walle
2008-02-27 3:44 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox