diff mbox series

[BlueZ] gatt: Fix scan-build warnings

Message ID 20220921215041.2243423-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 31b32daf529204313be3da08e1809dc916a37864
Headers show
Series [BlueZ] gatt: Fix scan-build warnings | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS
tedd_an/scan_build warning Scan-Build: src/gatt-database.c:1138:10: warning: Value stored to 'bits' during its initialization is never read uint8_t bits[] = { BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING, ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.

Commit Message

Luiz Augusto von Dentz Sept. 21, 2022, 9:50 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes the following warnings:

src/gatt-database.c:3541:14: warning: Value stored to 'iface' during
its initialization is never read [deadcode.DeadStores]
        const char *iface = g_dbus_proxy_get_interface(proxy);
                    ^~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/gatt-database.c:3542:14: warning: Value stored to 'path' during
its initialization is never read [deadcode.DeadStores]
        const char *path = g_dbus_proxy_get_path(proxy);
                    ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 src/gatt-database.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Sept. 21, 2022, 11:11 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=679175

---Test result---

Test Summary:
CheckPatch                    PASS      0.66 seconds
GitLint                       PASS      0.45 seconds
Prep - Setup ELL              PASS      31.33 seconds
Build - Prep                  PASS      0.72 seconds
Build - Configure             PASS      10.18 seconds
Build - Make                  PASS      925.33 seconds
Make Check                    PASS      12.18 seconds
Make Check w/Valgrind         PASS      333.67 seconds
Make Distcheck                PASS      282.86 seconds
Build w/ext ELL - Configure   PASS      10.16 seconds
Build w/ext ELL - Make        PASS      98.70 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    WARNING   584.44 seconds

Details
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************
src/gatt-database.c:1138:10: warning: Value stored to 'bits' during its initialization is never read
        uint8_t bits[] = { BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING,
                ^~~~     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.




---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Sept. 22, 2022, 1:10 a.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 21 Sep 2022 14:50:41 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This fixes the following warnings:
> 
> src/gatt-database.c:3541:14: warning: Value stored to 'iface' during
> its initialization is never read [deadcode.DeadStores]
>         const char *iface = g_dbus_proxy_get_interface(proxy);
>                     ^~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/gatt-database.c:3542:14: warning: Value stored to 'path' during
> its initialization is never read [deadcode.DeadStores]
>         const char *path = g_dbus_proxy_get_path(proxy);
>                     ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Here is the summary with links:
  - [BlueZ] gatt: Fix scan-build warnings
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=31b32daf5292

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/gatt-database.c b/src/gatt-database.c
index a212dfc4e694..c72f4a4d5c54 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -3538,8 +3538,8 @@  static void register_characteristic(void *data, void *user_data)
 {
 	struct gatt_app *app = user_data;
 	GDBusProxy *proxy = data;
-	const char *iface = g_dbus_proxy_get_interface(proxy);
-	const char *path = g_dbus_proxy_get_path(proxy);
+	const char *iface;
+	const char *path;
 
 	if (app->failed)
 		return;