[PATCH] /drivers/acpi/acpica/nsrepair.c (2.6.35.7) - Fixed useless compile warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is not a problem, it is a simple fix for an ugly compiler warning. When I 
tried to cimpile, I got the following warning:
drivers/acpi/acpica/nsrepair.c: In function âacpi_ns_repair_objectâ:
drivers/acpi/acpica/nsrepair.c:125:29: warning: ânew_objectâ may be used 
uninitialized in this function
new_object is declared without being initialized. It is initialized in a 
conditional expression like if (expected_btypes & ACPI_RTYPE_INTEGER) so the 
compiler can't be sure that it will be used initialized, and it throws that 
warning.
Just have to initialize new_object which is a pointer with NULL.
Patch:

Signed-off-by: Ionut Gabriel Popescu <poyo_vl@xxxxxxxxx>
---

--- a/drivers/acpi/acpica/nsrepair.c    2010-09-20 08:35:56.568006487 +0300
+++ b/drivers/acpi/acpica/nsrepair.c    2010-09-20 08:00:40.000000000 +0300
@@ -122,7 +122,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);


      
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux