[PATCH] switch-on-port-available: Silence gcc warning.

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

 



This silences this gcc warning:
module-switch-on-port-available.c:111:12: warning:
    'good' may be used uninitialized in this function
---
 src/modules/module-switch-on-port-available.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
index 82ccb12..1c40295 100644
--- a/src/modules/module-switch-on-port-available.c
+++ b/src/modules/module-switch-on-port-available.c
@@ -92,7 +92,7 @@ static int try_to_switch_profile(pa_device_port *port) {
     pa_log_debug("Finding best profile");
 
     PA_HASHMAP_FOREACH(profile, port->profiles, state) {
-        bool good;
+        bool good = false;
 
         if (best_profile && best_profile->priority >= profile->priority)
             continue;
-- 
1.8.2.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux