Willy-JL 2 лет назад
Родитель
Сommit
e9863fac19

+ 6 - 6
ble_spam/protocols/continuity.c

@@ -30,9 +30,9 @@ const struct {
     {0x1220, "Beats Fit Pro"},
     {0x1220, "Beats Fit Pro"},
     {0x1620, "Beats Studio Buds+"},
     {0x1620, "Beats Studio Buds+"},
 };
 };
-const uint8_t pp_models_count = COUNT_OF(pp_models);
+static const uint8_t pp_models_count = COUNT_OF(pp_models);
 
 
-const struct {
+static const struct {
     uint8_t value;
     uint8_t value;
     const char* name;
     const char* name;
 } pp_prefixes[] = {
 } pp_prefixes[] = {
@@ -40,9 +40,9 @@ const struct {
     {0x01, "Not Your Device"},
     {0x01, "Not Your Device"},
     {0x05, "New Airtag"},
     {0x05, "New Airtag"},
 };
 };
-const uint8_t pp_prefixes_count = COUNT_OF(pp_prefixes);
+static const uint8_t pp_prefixes_count = COUNT_OF(pp_prefixes);
 
 
-const struct {
+static const struct {
     uint8_t value;
     uint8_t value;
     const char* name;
     const char* name;
 } na_actions[] = {
 } na_actions[] = {
@@ -59,7 +59,7 @@ const struct {
     {0x0D, "HomeKit AppleTV Setup"},
     {0x0D, "HomeKit AppleTV Setup"},
     {0x2B, "AppleID for AppleTV?"},
     {0x2B, "AppleID for AppleTV?"},
 };
 };
-const uint8_t na_actions_count = COUNT_OF(na_actions);
+static const uint8_t na_actions_count = COUNT_OF(na_actions);
 
 
 static const char* type_names[ContinuityTypeCOUNT] = {
 static const char* type_names[ContinuityTypeCOUNT] = {
     [ContinuityTypeAirDrop] = "AirDrop",
     [ContinuityTypeAirDrop] = "AirDrop",
@@ -401,7 +401,7 @@ static void extra_config(Ctx* ctx) {
     ContinuityCfg* cfg = &payload->cfg.continuity;
     ContinuityCfg* cfg = &payload->cfg.continuity;
     VariableItemList* list = ctx->variable_item_list;
     VariableItemList* list = ctx->variable_item_list;
     VariableItem* item;
     VariableItem* item;
-    size_t value_index;
+    uint8_t value_index;
 
 
     switch(cfg->type) {
     switch(cfg->type) {
     case ContinuityTypeProximityPair: {
     case ContinuityTypeProximityPair: {

+ 6 - 6
ble_spam/protocols/easysetup.c

@@ -4,7 +4,7 @@
 // Hacked together by @Willy-JL and @Spooks4576
 // Hacked together by @Willy-JL and @Spooks4576
 // Research by @Spooks4576
 // Research by @Spooks4576
 
 
-const struct {
+static const struct {
     uint32_t value;
     uint32_t value;
     const char* name;
     const char* name;
 } buds_models[] = {
 } buds_models[] = {
@@ -29,9 +29,9 @@ const struct {
     {0xAE073A, "Black & White Buds2"},
     {0xAE073A, "Black & White Buds2"},
     {0x011716, "Sleek Black Buds2"},
     {0x011716, "Sleek Black Buds2"},
 };
 };
-const uint8_t buds_models_count = COUNT_OF(buds_models);
+static const uint8_t buds_models_count = COUNT_OF(buds_models);
 
 
-const struct {
+static const struct {
     uint8_t value;
     uint8_t value;
     const char* name;
     const char* name;
 } watch_models[] = {
 } watch_models[] = {
@@ -66,7 +66,7 @@ const struct {
     {0xEC, "Black Watch6 Golf Edition"},
     {0xEC, "Black Watch6 Golf Edition"},
     {0xEF, "Black Watch6 TB Edition"},
     {0xEF, "Black Watch6 TB Edition"},
 };
 };
-const uint8_t watch_models_count = COUNT_OF(watch_models);
+static const uint8_t watch_models_count = COUNT_OF(watch_models);
 
 
 static const char* type_names[EasysetupTypeCOUNT] = {
 static const char* type_names[EasysetupTypeCOUNT] = {
     [EasysetupTypeBuds] = "EasySetup Buds",
     [EasysetupTypeBuds] = "EasySetup Buds",
@@ -81,7 +81,7 @@ static uint8_t packet_sizes[EasysetupTypeCOUNT] = {
     [EasysetupTypeBuds] = 31,
     [EasysetupTypeBuds] = 31,
     [EasysetupTypeWatch] = 15,
     [EasysetupTypeWatch] = 15,
 };
 };
-void make_packet(uint8_t* out_size, uint8_t** out_packet, Payload* payload) {
+static void make_packet(uint8_t* out_size, uint8_t** out_packet, Payload* payload) {
     EasysetupCfg* cfg = payload ? &payload->cfg.easysetup : NULL;
     EasysetupCfg* cfg = payload ? &payload->cfg.easysetup : NULL;
 
 
     EasysetupType type;
     EasysetupType type;
@@ -269,7 +269,7 @@ static void extra_config(Ctx* ctx) {
     EasysetupCfg* cfg = &payload->cfg.easysetup;
     EasysetupCfg* cfg = &payload->cfg.easysetup;
     VariableItemList* list = ctx->variable_item_list;
     VariableItemList* list = ctx->variable_item_list;
     VariableItem* item;
     VariableItem* item;
-    size_t value_index;
+    uint8_t value_index;
 
 
     switch(cfg->type) {
     switch(cfg->type) {
     case EasysetupTypeBuds: {
     case EasysetupTypeBuds: {

+ 2 - 2
ble_spam/protocols/fastpair.c

@@ -4,7 +4,7 @@
 // Hacked together by @Willy-JL and @Spooks4576
 // Hacked together by @Willy-JL and @Spooks4576
 // Documentation at https://developers.google.com/nearby/fast-pair/specifications/introduction
 // Documentation at https://developers.google.com/nearby/fast-pair/specifications/introduction
 
 
-const struct {
+static const struct {
     uint32_t value;
     uint32_t value;
     const char* name;
     const char* name;
 } models[] = {
 } models[] = {
@@ -547,7 +547,7 @@ const struct {
     {0xE2106F, "FBI"},
     {0xE2106F, "FBI"},
     {0xB37A62, "Tesla"},
     {0xB37A62, "Tesla"},
 };
 };
-const uint16_t models_count = COUNT_OF(models);
+static const uint16_t models_count = COUNT_OF(models);
 
 
 static const char* get_name(const Payload* payload) {
 static const char* get_name(const Payload* payload) {
     UNUSED(payload);
     UNUSED(payload);

+ 1 - 1
ble_spam/protocols/lovespouse.c

@@ -139,7 +139,7 @@ static void extra_config(Ctx* ctx) {
     LovespouseCfg* cfg = &payload->cfg.lovespouse;
     LovespouseCfg* cfg = &payload->cfg.lovespouse;
     VariableItemList* list = ctx->variable_item_list;
     VariableItemList* list = ctx->variable_item_list;
     VariableItem* item;
     VariableItem* item;
-    size_t value_index;
+    uint8_t value_index;
 
 
     item = variable_item_list_add(
     item = variable_item_list_add(
         list, "Toy Mode", modes[cfg->state].count + 1, mode_changed, payload);
         list, "Toy Mode", modes[cfg->state].count + 1, mode_changed, payload);

+ 2 - 2
ble_spam/protocols/swiftpair.c

@@ -4,7 +4,7 @@
 // Hacked together by @Willy-JL and @Spooks4576
 // Hacked together by @Willy-JL and @Spooks4576
 // Documentation at https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/bluetooth-swift-pair
 // Documentation at https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/bluetooth-swift-pair
 
 
-const char* names[] = {
+static const char* names[] = {
     "Assquach💦",
     "Assquach💦",
     "Flipper 🐬",
     "Flipper 🐬",
     "iOS 17 🍎",
     "iOS 17 🍎",
@@ -12,7 +12,7 @@ const char* names[] = {
     "👉👌",
     "👉👌",
     "🔵🦷",
     "🔵🦷",
 };
 };
-const uint8_t names_count = COUNT_OF(names);
+static const uint8_t names_count = COUNT_OF(names);
 
 
 static const char* get_name(const Payload* payload) {
 static const char* get_name(const Payload* payload) {
     UNUSED(payload);
     UNUSED(payload);