OSDN Git Service

hci_packetizer: fix unused building errors s-x86
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 26 Dec 2019 20:52:57 +0000 (21:52 +0100)
committerMauro Rossi <issor.oruam@gmail.com>
Fri, 9 Sep 2022 22:19:46 +0000 (00:19 +0200)
Fixes the following building errors:

system/bt/vendor_libs/linux/interface/hci_packetizer.cc:28:14:
error: unused variable 'preamble_size_for_type' [-Werror,-Wunused-const-variable]
const size_t preamble_size_for_type[] = {
             ^
system/bt/vendor_libs/linux/interface/hci_packetizer.cc:35:8:
error: unused function 'HciGetPacketLengthForType' [-Werror,-Wunused-function]
size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
       ^
2 errors generated.

vendor_libs/linux/interface/hci_packetizer.cc

index 6016cad..f77c7f0 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <dlfcn.h>
 #include <fcntl.h>
-
+#if 0
 namespace {
 
 const size_t preamble_size_for_type[] = {
@@ -39,7 +39,7 @@ size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
 }
 
 }  // namespace
-
+#endif
 namespace android {
 namespace hardware {
 namespace bluetooth {