Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5bb983b0cce9b7b281af15730f7019116dd42568
Commit:     5bb983b0cce9b7b281af15730f7019116dd42568
Parent:     0afc2edfada50980bec999f94dcea26ebad3dda6
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 7 17:47:41 2008 -0800
Committer:  Christoph Lameter <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 17:47:41 2008 -0800

    SLUB: Deal with annoying gcc warning on kfree()
    
    gcc 4.2 spits out an annoying warning if one casts a const void *
    pointer to a void * pointer. No warning is generated if the
    conversion is done through an assignment.
    
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
---
 mm/slub.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 3f05667..2dacaf5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2601,6 +2601,7 @@ EXPORT_SYMBOL(ksize);
 void kfree(const void *x)
 {
        struct page *page;
+       void *object = (void *)x;
 
        if (unlikely(ZERO_OR_NULL_PTR(x)))
                return;
@@ -2610,7 +2611,7 @@ void kfree(const void *x)
                put_page(page);
                return;
        }
-       slab_free(page->slab, page, (void *)x, __builtin_return_address(0));
+       slab_free(page->slab, page, object, __builtin_return_address(0));
 }
 EXPORT_SYMBOL(kfree);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to