Bluetooth: Fix build warning
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 4 Jul 2023 08:34:52 +0000 (17:34 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 24 Jul 2023 23:25:19 +0000 (08:25 +0900)
Occur build warning for unused variable, Fix warning

  net/bluetooth/hci_event.c: In function ‘process_adv_report’:
  net/bluetooth/hci_event.c:6470:7: warning: unused variable ‘match’ [-Wunused-variable]
    bool match;
         ^~~~~
  net/bluetooth/hci_event.c:6469:26: warning: unused variable ‘d’ [-Wunused-variable]
    struct discovery_state *d = &hdev->discovery;

Change-Id: I5c6778aea827e6d138009541991409834ea9cc07
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
net/bluetooth/hci_event.c

index e78c825eaf4cc685360d30861ce58fd3189e4279..2c9e47ab5e4e7cee65e323712722c2ce355f7dde 100644 (file)
@@ -6466,10 +6466,13 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
                               u8 direct_addr_type, s8 rssi, u8 *data, u8 len,
                               bool ext_adv, bool ctl_time, u64 instant)
 {
+#ifndef TIZEN_BT
        struct discovery_state *d = &hdev->discovery;
+       bool match;
+#endif
        struct smp_irk *irk;
        struct hci_conn *conn;
-       bool match, bdaddr_resolved;
+       bool bdaddr_resolved;
        u32 flags;
        u8 *ptr;