acpica: Fix set-but-unused gcc47 warning
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 9 Feb 2013 02:29:00 +0000 (10:29 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 9 Feb 2013 02:29:00 +0000 (10:29 +0800)
sys/contrib/dev/acpica-unix/utilities/utmutex.c
sys/dev/acpica/acpi_powerres.c

index 01a2422..1b8d1d6 100644 (file)
@@ -407,13 +407,17 @@ ACPI_STATUS
 AcpiUtReleaseMutex (
     ACPI_MUTEX_HANDLE       MutexId)
 {
+#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_MUTEX_DEBUG)
     ACPI_THREAD_ID          ThisThreadId;
+#endif
 
 
     ACPI_FUNCTION_NAME (UtReleaseMutex);
 
 
+#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_MUTEX_DEBUG)
     ThisThreadId = AcpiOsGetThreadId ();
+#endif
     ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Thread %u releasing Mutex [%s]\n",
         (UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId)));
 
index cb4a767..04eec74 100644 (file)
@@ -312,7 +312,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state)
     ACPI_OBJECT                        *reslist_object;
     ACPI_STATUS                        status;
     char                       *method_name, *reslist_name;
-    int                                res_changed;
 
     ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
 
@@ -443,7 +442,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state)
      * Now we are ready to switch, so kill off any current power
      * resource references.
      */
-    res_changed = acpi_pwr_dereference_resource(pc);
+    acpi_pwr_dereference_resource(pc);
 
     /*
      * Add new power resource references, if we have any.  Traverse the
@@ -455,7 +454,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state)
                          reslist_object->Package.Count));
        acpi_ForeachPackageObject(reslist_object, acpi_pwr_reference_resource,
                                  pc);
-       res_changed = 1;
     }
 
     /*