Fix compilation warning
Subsystems (2)
PATCH 1/1 Fix compilation warning
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
--- purgatory/purgatory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
purgatory/purgatory.c +1 -1
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 4 lines · Bernhard Walle
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
Signature · 7 lines
Horms _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 11 lines · Simon Horman
Quoted 4 lines · Bernhard Walle
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a castThanks 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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 7 lines · Bernhard Walle
Quoted 6 lines · Simon Horman
Quoted 4 lines · Bernhard Walle
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a cast
Quoted 7 lines
Quoted 5 lines
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 sizeIsn't this the case on every 32 bit system?
Yes, now you mention it, I expect so. I guess its not a problem.
Signature · 7 lines
Horms _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 11 lines · Simon Horman
Quoted 10 lines · Bernhard Walle
Quoted 9 lines · Simon Horman
Quoted 4 lines · Bernhard Walle
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a castThanks Bernhard, I have queued that up. Although I notice that on arm the warning turns into
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
purgatory/purgatory.c: In function 'verify_sha256_digest':purgatory/purgatory.c:21: warning: cast to pointer from integer of different sizeIsn'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
--- purgatory/purgatory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
purgatory/purgatory.c +1 -1
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 15 lines · Bernhard Walle
Quoted 14 lines · Simon Horman
Quoted 13 lines · Bernhard Walle
Quoted 11 lines · Simon Horman
Quoted 4 lines · Bernhard Walle
This patch fixes following compilation warning:
purgatory/purgatory.c:21: warning: passing argument 2 of 'sha256_update' makes pointer from integer without a castThanks 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
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
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.
Signature · 7 lines
Horms _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec