Bluetooth: Fix build warning 64/295264/1
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 4 Jul 2023 08:34:52 +0000 (17:34 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 4 Jul 2023 08:36:37 +0000 (17:36 +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 6e3edb2..ce3220e 100644 (file)
@@ -6465,10 +6465,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;