lkml.org 
[lkml]   [2017]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.2 096/147] ACPICA: Fix 'may be used uninitialized' warning in acpi_ns_repair_object()
    3.2.95-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Ben Hutchings <ben@decadent.org.uk>

    gcc 4.7 warns that new_object may be used uninitialized in this
    function. In fact, all the cases where it's not initialised are
    errors that will result in returning early without using it.
    Silence the warning by initialising to NULL.

    This was done upstream as part of commit d5a36100f62f "ACPICA: Add
    mechanism for early object repairs on a per-name basis".

    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    --- a/drivers/acpi/acpica/nsrepair.c
    +++ b/drivers/acpi/acpica/nsrepair.c
    @@ -121,7 +121,7 @@ acpi_ns_repair_object(struct acpi_predef
    union acpi_operand_object **return_object_ptr)
    {
    union acpi_operand_object *return_object = *return_object_ptr;
    - union acpi_operand_object *new_object;
    + union acpi_operand_object *new_object = NULL;
    acpi_status status;

    ACPI_FUNCTION_NAME(ns_repair_object);
    \
     
     \ /
      Last update: 2017-11-08 20:58    [W:4.274 / U:0.772 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site