* [PATCH] android/tester: Fix slang "never used" warning
@ 2014-02-21 15:46 Andrei Emeltchenko
2014-02-21 16:00 ` Szymon Janc
0 siblings, 1 reply; 4+ messages in thread
From: Andrei Emeltchenko @ 2014-02-21 15:46 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] android/tester: Fix slang "never used" warning
2014-02-21 15:46 [PATCH] android/tester: Fix slang "never used" warning Andrei Emeltchenko
@ 2014-02-21 16:00 ` Szymon Janc
2014-02-24 7:15 ` Andrei Emeltchenko
0 siblings, 1 reply; 4+ messages in thread
From: Szymon Janc @ 2014-02-21 16:00 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
On Friday 21 of February 2014 17:46:47 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> 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();
This should be tester_test_failed().
> + return;
> + }
>
> adapter_status = data->if_bluetooth->get_adapter_property((*prop).type);
> check_expected_status(adapter_status);
>
--
Best regards,
Szymon Janc
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] android/tester: Fix slang "never used" warning
2014-02-21 16:00 ` Szymon Janc
@ 2014-02-24 7:15 ` Andrei Emeltchenko
2014-02-24 9:30 ` Szymon Janc
0 siblings, 1 reply; 4+ messages in thread
From: Andrei Emeltchenko @ 2014-02-24 7:15 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
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..a376b11 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_test_failed();
+ return;
+ }
adapter_status = data->if_bluetooth->get_adapter_property((*prop).type);
check_expected_status(adapter_status);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] android/tester: Fix slang "never used" warning
2014-02-24 7:15 ` Andrei Emeltchenko
@ 2014-02-24 9:30 ` Szymon Janc
0 siblings, 0 replies; 4+ messages in thread
From: Szymon Janc @ 2014-02-24 9:30 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
On Monday 24 of February 2014 09:15:44 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> 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..a376b11 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_test_failed();
> + return;
> + }
>
> adapter_status = data->if_bluetooth->get_adapter_property((*prop).type);
> check_expected_status(adapter_status);
>
Applied, thanks.
--
Best regards,
Szymon Janc
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-24 9:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 15:46 [PATCH] android/tester: Fix slang "never used" warning Andrei Emeltchenko
2014-02-21 16:00 ` Szymon Janc
2014-02-24 7:15 ` Andrei Emeltchenko
2014-02-24 9:30 ` Szymon Janc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).