Thread (4 messages) flat view 4 messages, 3 authors, 2014-02-24
STALE4591d

[PATCH] android/tester: Fix slang "never used" warning

From: Andrei Emeltchenko <hidden>
Date: 2014-02-21 15:46:47
Subsystem: the rest · Maintainer: Linus Torvalds

From: Andrei Emeltchenko <redacted>

The patch fixes following warning:
...
android/android-tester.c:2185:2: warning: Value stored to
'adapter_status' is never read
        adapter_status = data->if_bluetooth->set_adapter_property(prop);
        ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
---
 android/android-tester.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/android/android-tester.c b/android/android-tester.c
index 84c6ca9..47f918c 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -2190,6 +2190,10 @@ static void test_getprop_bdname_success(const void *test_data)
 	init_test_conditions(data);
 
 	adapter_status = data->if_bluetooth->set_adapter_property(prop);
+	if (adapter_status != BT_STATUS_SUCCESS) {
+		tester_setup_failed();
+		return;
+	}
 
 	adapter_status = data->if_bluetooth->get_adapter_property((*prop).type);
 	check_expected_status(adapter_status);
-- 
1.8.3.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help