Bladeren bron

Fixes for gcc12

Thanks @Willy-JL !
for fixing 13 apps in this commit,
other apps fixed by me
MX 1 jaar geleden
bovenliggende
commit
7d8eb6d34a
40 gewijzigde bestanden met toevoegingen van 347 en 315 verwijderingen
  1. 1 1
      apps_source_code/color_guess/application.fam
  2. 0 2
      apps_source_code/color_guess/views/color_guess_play.c
  3. 1 1
      apps_source_code/flipper_geiger/application.fam
  4. 150 125
      apps_source_code/flipper_geiger/flipper_geiger.c
  5. 1 1
      apps_source_code/flipperzero-text2sam/application.fam
  6. 2 2
      apps_source_code/flipperzero-text2sam/stm32_sam.cpp
  7. 1 1
      base_pack/game_2048/application.fam
  8. 6 6
      base_pack/game_2048/game_2048.c
  9. 1 1
      base_pack/heap_defence_game/application.fam
  10. 1 1
      base_pack/heap_defence_game/heap_defence.c
  11. 1 1
      base_pack/mousejacker/application.fam
  12. 3 3
      base_pack/mousejacker/mousejacker_ducky.c
  13. 1 1
      base_pack/picopass/scenes/picopass_scene_read_card_success.c
  14. 4 8
      base_pack/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c
  15. 3 3
      non_catalog_apps/FlipBIP/helpers/flipbip_file.c
  16. 1 0
      non_catalog_apps/airmouse/tracking/util/vector.h
  17. 3 3
      non_catalog_apps/chess/helpers/flipchess_file.c
  18. 2 2
      non_catalog_apps/chess/sam/stm32_sam.cpp
  19. 1 0
      non_catalog_apps/esubghz_chat/crypto_wrapper.c
  20. 4 4
      non_catalog_apps/flipper_plane/game_state.c
  21. 2 2
      non_catalog_apps/flipper_plane/paperplane.c
  22. 8 0
      non_catalog_apps/flizzer_tracker/flizzer_tracker.c
  23. 0 4
      non_catalog_apps/flizzer_tracker/sound_engine/sound_engine.c
  24. 7 7
      non_catalog_apps/meal_pager/helpers/meal_pager_storage.c
  25. 3 3
      non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_t119.c
  26. 3 3
      non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_td157.c
  27. 3 3
      non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_td165.c
  28. 3 3
      non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_td174.c
  29. 1 1
      non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_first_pager.c
  30. 1 1
      non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_first_station.c
  31. 2 2
      non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_last_pager.c
  32. 2 2
      non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_last_station.c
  33. 3 3
      non_catalog_apps/mousejacker_ms/mousejacker_ducky.c
  34. 80 80
      non_catalog_apps/sudoku/sudoku.c
  35. 23 25
      non_catalog_apps/tanksgame/tanks_game.c
  36. 2 2
      non_catalog_apps/ublox/ublox_device.c
  37. 1 1
      non_catalog_apps/vexed/draw.c
  38. 5 5
      non_catalog_apps/vexed/game.h
  39. 9 0
      non_catalog_apps/video_player/video_player.c
  40. 2 2
      non_catalog_apps/wch_swio_flasher/views/debugger_emulator.c

+ 1 - 1
apps_source_code/color_guess/application.fam

@@ -11,7 +11,7 @@ App(
     order=10,
     order=10,
     fap_icon="color_guess_10px.png",
     fap_icon="color_guess_10px.png",
     fap_icon_assets="icons",
     fap_icon_assets="icons",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_category="Games",
     fap_category="Games",
     fap_author="Leedave",
     fap_author="Leedave",
     fap_description="Color Guessing Game",
     fap_description="Color Guessing Game",

+ 0 - 2
apps_source_code/color_guess/views/color_guess_play.c

@@ -323,8 +323,6 @@ ColorGuessPlay* color_guess_play_alloc() {
 void color_guess_play_free(ColorGuessPlay* instance) {
 void color_guess_play_free(ColorGuessPlay* instance) {
     furi_assert(instance);
     furi_assert(instance);
 
 
-    with_view_model(
-        instance->view, ColorGuessPlayModel * model, { free(model->digit); }, true);
     view_free(instance->view);
     view_free(instance->view);
     free(instance);
     free(instance);
 }
 }

+ 1 - 1
apps_source_code/flipper_geiger/application.fam

@@ -12,6 +12,6 @@ App(
     fap_category="GPIO",
     fap_category="GPIO",
     fap_author="@nmrr",
     fap_author="@nmrr",
     fap_weburl="https://github.com/nmrr/flipperzero-geigercounter",
     fap_weburl="https://github.com/nmrr/flipperzero-geigercounter",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_description="Works with J305 Geiger tube on external board",
     fap_description="Works with J305 Geiger tube on external board",
 )
 )

+ 150 - 125
apps_source_code/flipper_geiger/flipper_geiger.c

@@ -46,8 +46,7 @@ typedef struct {
     uint8_t version;
     uint8_t version;
 } mutexStruct;
 } mutexStruct;
 
 
-static void draw_callback(Canvas* canvas, void* ctx) 
-{
+static void draw_callback(Canvas* canvas, void* ctx) {
     furi_assert(ctx);
     furi_assert(ctx);
 
 
     mutexStruct* mutexVal = ctx;
     mutexStruct* mutexVal = ctx;
@@ -56,68 +55,96 @@ static void draw_callback(Canvas* canvas, void* ctx)
     memcpy(&mutexDraw, mutexVal, sizeof(mutexStruct));
     memcpy(&mutexDraw, mutexVal, sizeof(mutexStruct));
     furi_mutex_release(mutexVal->mutex);
     furi_mutex_release(mutexVal->mutex);
 
 
-    if (mutexDraw.version == 0)
-    {
+    if(mutexDraw.version == 0) {
         char buffer[32];
         char buffer[32];
-        if (mutexDraw.data == 0) snprintf(buffer, sizeof(buffer), "%ld cps - %ld cpm", mutexDraw.cps, mutexDraw.cpm);
-        else if (mutexDraw.data == 1) snprintf(buffer, sizeof(buffer), "%ld cps - %.2f uSv/h", mutexDraw.cps, ((double)mutexDraw.cpm*(double)CONVERSION_FACTOR));
-        else if (mutexDraw.data == 2) snprintf(buffer, sizeof(buffer), "%ld cps - %.2f mSv/y", mutexDraw.cps, (((double)mutexDraw.cpm*(double)CONVERSION_FACTOR))*(double)8.76);
-        else if (mutexDraw.data == 3) snprintf(buffer, sizeof(buffer), "%ld cps - %.4f Rad/h", mutexDraw.cps, ((double)mutexDraw.cpm*(double)CONVERSION_FACTOR)/(double)10000);
-        else if (mutexDraw.data == 4) snprintf(buffer, sizeof(buffer), "%ld cps - %.2f mR/h", mutexDraw.cps, ((double)mutexDraw.cpm*(double)CONVERSION_FACTOR)/(double)10);
-        else snprintf(buffer, sizeof(buffer), "%ld cps - %.2f uR/h", mutexDraw.cps, ((double)mutexDraw.cpm*(double)CONVERSION_FACTOR)*(double)100);
+        if(mutexDraw.data == 0)
+            snprintf(buffer, sizeof(buffer), "%ld cps - %ld cpm", mutexDraw.cps, mutexDraw.cpm);
+        else if(mutexDraw.data == 1)
+            snprintf(
+                buffer,
+                sizeof(buffer),
+                "%ld cps - %.2f uSv/h",
+                mutexDraw.cps,
+                ((double)mutexDraw.cpm * (double)CONVERSION_FACTOR));
+        else if(mutexDraw.data == 2)
+            snprintf(
+                buffer,
+                sizeof(buffer),
+                "%ld cps - %.2f mSv/y",
+                mutexDraw.cps,
+                (((double)mutexDraw.cpm * (double)CONVERSION_FACTOR)) * (double)8.76);
+        else if(mutexDraw.data == 3)
+            snprintf(
+                buffer,
+                sizeof(buffer),
+                "%ld cps - %.4f Rad/h",
+                mutexDraw.cps,
+                ((double)mutexDraw.cpm * (double)CONVERSION_FACTOR) / (double)10000);
+        else if(mutexDraw.data == 4)
+            snprintf(
+                buffer,
+                sizeof(buffer),
+                "%ld cps - %.2f mR/h",
+                mutexDraw.cps,
+                ((double)mutexDraw.cpm * (double)CONVERSION_FACTOR) / (double)10);
+        else
+            snprintf(
+                buffer,
+                sizeof(buffer),
+                "%ld cps - %.2f uR/h",
+                mutexDraw.cps,
+                ((double)mutexDraw.cpm * (double)CONVERSION_FACTOR) * (double)100);
 
 
         canvas_set_font(canvas, FontPrimary);
         canvas_set_font(canvas, FontPrimary);
         canvas_draw_str_aligned(canvas, 64, 10, AlignCenter, AlignBottom, buffer);
         canvas_draw_str_aligned(canvas, 64, 10, AlignCenter, AlignBottom, buffer);
 
 
         uint8_t linePosition = mutexDraw.newLinePosition;
         uint8_t linePosition = mutexDraw.newLinePosition;
 
 
-        if (mutexDraw.zoom == 0)
-        {
-            for (int i=0;i<SCREEN_SIZE_X;i+=8)
-            {
-                if (linePosition != 0) linePosition--;
-                else linePosition = SCREEN_SIZE_X - 1;
+        if(mutexDraw.zoom == 0) {
+            for(int i = 0; i < SCREEN_SIZE_X; i += 8) {
+                if(linePosition != 0)
+                    linePosition--;
+                else
+                    linePosition = SCREEN_SIZE_X - 1;
 
 
-                float Y = SCREEN_SIZE_Y-(mutexDraw.line[linePosition]*mutexDraw.coef);
-                for (int j=0;j<8;j++)canvas_draw_line(canvas, i+j, Y, i+j, SCREEN_SIZE_Y);
+                float Y = SCREEN_SIZE_Y - (mutexDraw.line[linePosition] * mutexDraw.coef);
+                for(int j = 0; j < 8; j++)
+                    canvas_draw_line(canvas, i + j, Y, i + j, SCREEN_SIZE_Y);
             }
             }
-        }
-        else if (mutexDraw.zoom == 1)
-        {
-            for (int i=0;i<SCREEN_SIZE_X;i+=4)
-            {
-                if (linePosition != 0) linePosition--;
-                else linePosition = SCREEN_SIZE_X - 1;
-
-                float Y = SCREEN_SIZE_Y-(mutexDraw.line[linePosition]*mutexDraw.coef);
-                for (int j=0;j<4;j++)canvas_draw_line(canvas, i+j, Y, i+j, SCREEN_SIZE_Y);
+        } else if(mutexDraw.zoom == 1) {
+            for(int i = 0; i < SCREEN_SIZE_X; i += 4) {
+                if(linePosition != 0)
+                    linePosition--;
+                else
+                    linePosition = SCREEN_SIZE_X - 1;
+
+                float Y = SCREEN_SIZE_Y - (mutexDraw.line[linePosition] * mutexDraw.coef);
+                for(int j = 0; j < 4; j++)
+                    canvas_draw_line(canvas, i + j, Y, i + j, SCREEN_SIZE_Y);
             }
             }
-        }
-        else if (mutexDraw.zoom == 2)
-        {
-            for (int i=0;i<SCREEN_SIZE_X;i+=2)
-            {
-                if (linePosition != 0) linePosition--;
-                else linePosition = SCREEN_SIZE_X - 1;
-
-                float Y = SCREEN_SIZE_Y-(mutexDraw.line[linePosition]*mutexDraw.coef);
-                for (int j=0;j<2;j++)canvas_draw_line(canvas, i+j, Y, i+j, SCREEN_SIZE_Y);
+        } else if(mutexDraw.zoom == 2) {
+            for(int i = 0; i < SCREEN_SIZE_X; i += 2) {
+                if(linePosition != 0)
+                    linePosition--;
+                else
+                    linePosition = SCREEN_SIZE_X - 1;
+
+                float Y = SCREEN_SIZE_Y - (mutexDraw.line[linePosition] * mutexDraw.coef);
+                for(int j = 0; j < 2; j++)
+                    canvas_draw_line(canvas, i + j, Y, i + j, SCREEN_SIZE_Y);
             }
             }
-        }
-        else if (mutexDraw.zoom == 3)
-        {
-            for (int i=0;i<SCREEN_SIZE_X;i++)
-            {
-                if (linePosition != 0) linePosition--;
-                else linePosition = SCREEN_SIZE_X - 1;
-
-                float Y = SCREEN_SIZE_Y-(mutexDraw.line[linePosition]*mutexDraw.coef);
+        } else if(mutexDraw.zoom == 3) {
+            for(int i = 0; i < SCREEN_SIZE_X; i++) {
+                if(linePosition != 0)
+                    linePosition--;
+                else
+                    linePosition = SCREEN_SIZE_X - 1;
+
+                float Y = SCREEN_SIZE_Y - (mutexDraw.line[linePosition] * mutexDraw.coef);
                 canvas_draw_line(canvas, i, Y, i, SCREEN_SIZE_Y);
                 canvas_draw_line(canvas, i, Y, i, SCREEN_SIZE_Y);
             }
             }
         }
         }
-    }
-    else
-    {
+    } else {
         canvas_set_font(canvas, FontPrimary);
         canvas_set_font(canvas, FontPrimary);
         canvas_draw_str_aligned(canvas, 64, 10, AlignCenter, AlignBottom, "Geiger Counter");
         canvas_draw_str_aligned(canvas, 64, 10, AlignCenter, AlignBottom, "Geiger Counter");
         canvas_draw_str_aligned(canvas, 64, 20, AlignCenter, AlignBottom, "Version 20230806");
         canvas_draw_str_aligned(canvas, 64, 20, AlignCenter, AlignBottom, "Version 20230806");
@@ -125,8 +152,7 @@ static void draw_callback(Canvas* canvas, void* ctx)
     }
     }
 }
 }
 
 
-static void input_callback(InputEvent* input_event, void* ctx) 
-{
+static void input_callback(InputEvent* input_event, void* ctx) {
     furi_assert(ctx);
     furi_assert(ctx);
     FuriMessageQueue* event_queue = ctx;
     FuriMessageQueue* event_queue = ctx;
     EventApp event = {.type = EventTypeInput, .input = *input_event};
     EventApp event = {.type = EventTypeInput, .input = *input_event};
@@ -138,7 +164,7 @@ static void clock_tick(void* ctx) {
 
 
     uint32_t randomNumber = furi_hal_random_get();
     uint32_t randomNumber = furi_hal_random_get();
     randomNumber &= 0xFFF;
     randomNumber &= 0xFFF;
-    if (randomNumber == 0) randomNumber = 1;
+    if(randomNumber == 0) randomNumber = 1;
 
 
     furi_hal_pwm_set_params(FuriHalPwmOutputIdLptim2PA4, randomNumber, 50);
     furi_hal_pwm_set_params(FuriHalPwmOutputIdLptim2PA4, randomNumber, 50);
 
 
@@ -154,8 +180,10 @@ static void gpiocallback(void* ctx) {
     furi_message_queue_put(queue, &event, 0);
     furi_message_queue_put(queue, &event, 0);
 }
 }
 
 
-int32_t flipper_geiger_app() 
-{
+int32_t flipper_geiger_app() {
+    Expansion* expansion = furi_record_open(RECORD_EXPANSION);
+    expansion_disable(expansion);
+
     EventApp event;
     EventApp event;
     FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(EventApp));
     FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(EventApp));
 
 
@@ -165,7 +193,7 @@ int32_t flipper_geiger_app()
     mutexStruct mutexVal;
     mutexStruct mutexVal;
     mutexVal.cps = 0;
     mutexVal.cps = 0;
     mutexVal.cpm = 0;
     mutexVal.cpm = 0;
-    for (int i=0;i<SCREEN_SIZE_X;i++) mutexVal.line[i] = 0;
+    for(int i = 0; i < SCREEN_SIZE_X; i++) mutexVal.line[i] = 0;
     mutexVal.coef = 1;
     mutexVal.coef = 1;
     mutexVal.data = 0;
     mutexVal.data = 0;
     mutexVal.zoom = 2;
     mutexVal.zoom = 2;
@@ -174,7 +202,7 @@ int32_t flipper_geiger_app()
 
 
     uint32_t counter = 0;
     uint32_t counter = 0;
 
 
-    mutexVal.mutex= furi_mutex_alloc(FuriMutexTypeNormal);
+    mutexVal.mutex = furi_mutex_alloc(FuriMutexTypeNormal);
     if(!mutexVal.mutex) {
     if(!mutexVal.mutex) {
         furi_message_queue_free(event_queue);
         furi_message_queue_free(event_queue);
         expansion_enable(expansion);
         expansion_enable(expansion);
@@ -211,109 +239,104 @@ int32_t flipper_geiger_app()
 
 
     NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
     NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
 
 
-    while(1) 
-    {
+    while(1) {
         FuriStatus event_status = furi_message_queue_get(event_queue, &event, FuriWaitForever);
         FuriStatus event_status = furi_message_queue_get(event_queue, &event, FuriWaitForever);
-        
+
         uint8_t screenRefresh = 0;
         uint8_t screenRefresh = 0;
 
 
-        if (event_status == FuriStatusOk)
-        {   
-            if(event.type == EventTypeInput) 
-            {
-                if(event.input.key == InputKeyBack && event.input.type == InputTypeLong) 
-                {
+        if(event_status == FuriStatusOk) {
+            if(event.type == EventTypeInput) {
+                if(event.input.key == InputKeyBack && event.input.type == InputTypeLong) {
                     break;
                     break;
-                }
-                else if(event.input.key == InputKeyOk && event.input.type == InputTypeLong)
-                {
+                } else if(event.input.key == InputKeyOk && event.input.type == InputTypeLong) {
                     counter = 0;
                     counter = 0;
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
 
 
                     mutexVal.cps = 0;
                     mutexVal.cps = 0;
                     mutexVal.cpm = 0;
                     mutexVal.cpm = 0;
-                    for (uint8_t i=0;i<SCREEN_SIZE_X;i++) mutexVal.line[i] = 0;
+                    for(uint8_t i = 0; i < SCREEN_SIZE_X; i++) mutexVal.line[i] = 0;
                     mutexVal.newLinePosition = 0;
                     mutexVal.newLinePosition = 0;
 
 
                     screenRefresh = 1;
                     screenRefresh = 1;
                     furi_mutex_release(mutexVal.mutex);
                     furi_mutex_release(mutexVal.mutex);
-                }
-                else if(event.input.key == InputKeyUp && event.input.type == InputTypeLong)
-                {
-                    if (recordData == 0) 
-                    {
+                } else if(event.input.key == InputKeyUp && event.input.type == InputTypeLong) {
+                    if(recordData == 0) {
                         notification_message(notification, &sequence_set_only_red_255);
                         notification_message(notification, &sequence_set_only_red_255);
 
 
                         FuriHalRtcDateTime datetime;
                         FuriHalRtcDateTime datetime;
                         furi_hal_rtc_get_datetime(&datetime);
                         furi_hal_rtc_get_datetime(&datetime);
 
 
                         char path[64];
                         char path[64];
-                        snprintf(path, sizeof(path), EXT_PATH("/geiger-%.4d-%.2d-%.2d--%.2d-%.2d-%.2d.csv"), datetime.year, datetime.month, datetime.day, datetime.hour, datetime.minute, datetime.second);
-
-                        buffered_file_stream_open(file_stream, path, FSAM_WRITE, FSOM_CREATE_ALWAYS);
+                        snprintf(
+                            path,
+                            sizeof(path),
+                            EXT_PATH("/geiger-%.4d-%.2d-%.2d--%.2d-%.2d-%.2d.csv"),
+                            datetime.year,
+                            datetime.month,
+                            datetime.day,
+                            datetime.hour,
+                            datetime.minute,
+                            datetime.second);
+
+                        buffered_file_stream_open(
+                            file_stream, path, FSAM_WRITE, FSOM_CREATE_ALWAYS);
                         furi_string_printf(dataString, "epoch,cps\n");
                         furi_string_printf(dataString, "epoch,cps\n");
                         stream_write_string(file_stream, dataString);
                         stream_write_string(file_stream, dataString);
                         epoch = 0;
                         epoch = 0;
                         recordData = 1;
                         recordData = 1;
-                    }
-                    else
-                    {
+                    } else {
                         buffered_file_stream_close(file_stream);
                         buffered_file_stream_close(file_stream);
                         notification_message(notification, &sequence_reset_red);
                         notification_message(notification, &sequence_reset_red);
                         recordData = 0;
                         recordData = 0;
                     }
                     }
-                }
-                else if((event.input.key == InputKeyLeft && event.input.type == InputTypeShort))
-                {
+                } else if((event.input.key == InputKeyLeft &&
+                           event.input.type == InputTypeShort)) {
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
 
 
-                    if (mutexVal.data != 0) mutexVal.data--;
-                    else mutexVal.data = 5;
+                    if(mutexVal.data != 0)
+                        mutexVal.data--;
+                    else
+                        mutexVal.data = 5;
 
 
                     screenRefresh = 1;
                     screenRefresh = 1;
                     furi_mutex_release(mutexVal.mutex);
                     furi_mutex_release(mutexVal.mutex);
-                }
-                else if((event.input.key == InputKeyRight && event.input.type == InputTypeShort))
-                {
+                } else if((event.input.key == InputKeyRight &&
+                           event.input.type == InputTypeShort)) {
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
 
 
-                    if (mutexVal.data != 5) mutexVal.data++;
-                    else mutexVal.data = 0;
+                    if(mutexVal.data != 5)
+                        mutexVal.data++;
+                    else
+                        mutexVal.data = 0;
 
 
                     screenRefresh = 1;
                     screenRefresh = 1;
                     furi_mutex_release(mutexVal.mutex);
                     furi_mutex_release(mutexVal.mutex);
-                }
-                else if((event.input.key == InputKeyUp && event.input.type == InputTypeShort))
-                {
+                } else if((event.input.key == InputKeyUp && event.input.type == InputTypeShort)) {
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
-                    if (mutexVal.zoom != 0) mutexVal.zoom--;
+                    if(mutexVal.zoom != 0) mutexVal.zoom--;
 
 
                     screenRefresh = 1;
                     screenRefresh = 1;
                     furi_mutex_release(mutexVal.mutex);
                     furi_mutex_release(mutexVal.mutex);
 
 
-                }
-                else if((event.input.key == InputKeyDown && event.input.type == InputTypeShort))
-                {
+                } else if((event.input.key == InputKeyDown &&
+                           event.input.type == InputTypeShort)) {
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
-                    if (mutexVal.zoom != 3) mutexVal.zoom++;
+                    if(mutexVal.zoom != 3) mutexVal.zoom++;
 
 
                     screenRefresh = 1;
                     screenRefresh = 1;
                     furi_mutex_release(mutexVal.mutex);
                     furi_mutex_release(mutexVal.mutex);
-                }
-                else if((event.input.key == InputKeyDown && event.input.type == InputTypeLong))
-                {
+                } else if((event.input.key == InputKeyDown && event.input.type == InputTypeLong)) {
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
                     furi_mutex_acquire(mutexVal.mutex, FuriWaitForever);
-                    if (mutexVal.version == 0) mutexVal.version = 1;
-                    else mutexVal.version = 0;
+                    if(mutexVal.version == 0)
+                        mutexVal.version = 1;
+                    else
+                        mutexVal.version = 0;
 
 
                     screenRefresh = 1;
                     screenRefresh = 1;
                     furi_mutex_release(mutexVal.mutex);
                     furi_mutex_release(mutexVal.mutex);
                 }
                 }
-            }
-            else if (event.type == ClockEventTypeTick)
-            {
-                if (recordData == 1)
-                {
+            } else if(event.type == ClockEventTypeTick) {
+                if(recordData == 1) {
                     furi_string_printf(dataString, "%lu,%lu\n", epoch++, counter);
                     furi_string_printf(dataString, "%lu,%lu\n", epoch++, counter);
                     stream_write_string(file_stream, dataString);
                     stream_write_string(file_stream, dataString);
                 }
                 }
@@ -328,35 +351,37 @@ int32_t flipper_geiger_app()
                 uint32_t max = mutexVal.line[mutexVal.newLinePosition];
                 uint32_t max = mutexVal.line[mutexVal.newLinePosition];
                 uint8_t linePosition = mutexVal.newLinePosition;
                 uint8_t linePosition = mutexVal.newLinePosition;
 
 
-                for (int i=1;i<SCREEN_SIZE_X;i++)
-                {
-                    if (linePosition != 0) linePosition--;
-                    else linePosition = SCREEN_SIZE_X - 1;
+                for(int i = 1; i < SCREEN_SIZE_X; i++) {
+                    if(linePosition != 0)
+                        linePosition--;
+                    else
+                        linePosition = SCREEN_SIZE_X - 1;
 
 
-                    if (i < 60) mutexVal.cpm += mutexVal.line[linePosition];
-                    if (mutexVal.line[linePosition] > max) max = mutexVal.line[linePosition];
+                    if(i < 60) mutexVal.cpm += mutexVal.line[linePosition];
+                    if(mutexVal.line[linePosition] > max) max = mutexVal.line[linePosition];
                 }
                 }
 
 
-                if (max > 0) mutexVal.coef = ((float)(SCREEN_SIZE_Y-15))/((float)max);
-                else mutexVal.coef = 1;
+                if(max > 0)
+                    mutexVal.coef = ((float)(SCREEN_SIZE_Y - 15)) / ((float)max);
+                else
+                    mutexVal.coef = 1;
 
 
-                if (mutexVal.newLinePosition != SCREEN_SIZE_X - 1) mutexVal.newLinePosition++;
-                else mutexVal.newLinePosition = 0;
+                if(mutexVal.newLinePosition != SCREEN_SIZE_X - 1)
+                    mutexVal.newLinePosition++;
+                else
+                    mutexVal.newLinePosition = 0;
 
 
                 screenRefresh = 1;
                 screenRefresh = 1;
                 furi_mutex_release(mutexVal.mutex);
                 furi_mutex_release(mutexVal.mutex);
-            }
-            else if (event.type == EventGPIO)
-            {
+            } else if(event.type == EventGPIO) {
                 counter++;
                 counter++;
             }
             }
         }
         }
 
 
-        if (screenRefresh == 1) view_port_update(view_port);
+        if(screenRefresh == 1) view_port_update(view_port);
     }
     }
 
 
-    if (recordData == 1) 
-    {
+    if(recordData == 1) {
         buffered_file_stream_close(file_stream);
         buffered_file_stream_close(file_stream);
         notification_message(notification, &sequence_reset_red);
         notification_message(notification, &sequence_reset_red);
     }
     }

+ 1 - 1
apps_source_code/flipperzero-text2sam/application.fam

@@ -16,6 +16,6 @@ App(
     order=20,
     order=20,
     fap_author="@Round-Pi & (Fixes by @Willy-JL)",
     fap_author="@Round-Pi & (Fixes by @Willy-JL)",
     fap_weburl="https://github.com/Round-Pi/flipperzero-text2sam",
     fap_weburl="https://github.com/Round-Pi/flipperzero-text2sam",
-    fap_version="1.2",
+    fap_version="1.3",
     fap_description="Convert text to speech on your Flipper Zero with SAM (Software Automatic Mouth).",
     fap_description="Convert text to speech on your Flipper Zero with SAM (Software Automatic Mouth).",
 )
 )

+ 2 - 2
apps_source_code/flipperzero-text2sam/stm32_sam.cpp

@@ -4510,7 +4510,7 @@ void STM32SAM::AdjustLengths() {
                 mem56 = flags[index];
                 mem56 = flags[index];
 
 
             // not a consonant
             // not a consonant
-            if((flags[index] & 64) == 0) {
+            if((mem56 & 64) == 0) {
                 // RX or LX?
                 // RX or LX?
                 if((index == 18) || (index == 19)) // 'RX' & 'LX'
                 if((index == 18) || (index == 19)) // 'RX' & 'LX'
                 {
                 {
@@ -4519,7 +4519,7 @@ void STM32SAM::AdjustLengths() {
                     index = phonemeindex[X];
                     index = phonemeindex[X];
 
 
                     // next phoneme a consonant?
                     // next phoneme a consonant?
-                    if((flags[index] & 64) != 0) {
+                    if((mem56 & 64) != 0) {
                         // RULE: <VOWEL> RX | LX <CONSONANT>
                         // RULE: <VOWEL> RX | LX <CONSONANT>
 
 
                         // decrease length of vowel by 1 frame
                         // decrease length of vowel by 1 frame

+ 1 - 1
base_pack/game_2048/application.fam

@@ -11,6 +11,6 @@ App(
 	fap_icon="game_2048.png",
 	fap_icon="game_2048.png",
     fap_category="Games",
     fap_category="Games",
     fap_author="@eugene-kirzhanov",
     fap_author="@eugene-kirzhanov",
-    fap_version="1.2",
+    fap_version="1.3",
     fap_description="Play the port of the 2048 game on Flipper Zero.",
     fap_description="Play the port of the 2048 game on Flipper Zero.",
 )
 )

+ 6 - 6
base_pack/game_2048/game_2048.c

@@ -79,7 +79,7 @@ static void draw_digit(Canvas* canvas, uint8_t row, uint8_t column, uint8_t valu
     uint8_t top = FRAME_TOP + 1 + (row * (CELL_INNER_SIZE + 1));
     uint8_t top = FRAME_TOP + 1 + (row * (CELL_INNER_SIZE + 1));
 
 
     for(uint8_t r = 0; r < CELL_INNER_SIZE; r++) {
     for(uint8_t r = 0; r < CELL_INNER_SIZE; r++) {
-        for(u_int8_t c = 0; c < CELL_INNER_SIZE; c++) {
+        for(uint8_t c = 0; c < CELL_INNER_SIZE; c++) {
             if(digits[value - 1][r][c] == 1) {
             if(digits[value - 1][r][c] == 1) {
                 canvas_draw_dot(canvas, left + c, top + r);
                 canvas_draw_dot(canvas, left + c, top + r);
             }
             }
@@ -268,8 +268,8 @@ void move_down(uint8_t table[CELLS_COUNT][CELLS_COUNT], MoveResult* const move_r
 void add_new_digit(GameState* const game_state) {
 void add_new_digit(GameState* const game_state) {
     uint8_t empty_cell_indexes[CELLS_COUNT * CELLS_COUNT];
     uint8_t empty_cell_indexes[CELLS_COUNT * CELLS_COUNT];
     uint8_t empty_cells_count = 0;
     uint8_t empty_cells_count = 0;
-    for(u_int8_t i = 0; i < CELLS_COUNT; i++) {
-        for(u_int8_t j = 0; j < CELLS_COUNT; j++) {
+    for(uint8_t i = 0; i < CELLS_COUNT; i++) {
+        for(uint8_t j = 0; j < CELLS_COUNT; j++) {
             if(game_state->table[i][j] == 0) {
             if(game_state->table[i][j] == 0) {
                 empty_cell_indexes[empty_cells_count++] = i * CELLS_COUNT + j;
                 empty_cell_indexes[empty_cells_count++] = i * CELLS_COUNT + j;
             }
             }
@@ -278,8 +278,8 @@ void add_new_digit(GameState* const game_state) {
     if(empty_cells_count == 0) return;
     if(empty_cells_count == 0) return;
 
 
     int random_empty_cell_index = empty_cell_indexes[random() % empty_cells_count];
     int random_empty_cell_index = empty_cell_indexes[random() % empty_cells_count];
-    u_int8_t row = random_empty_cell_index / CELLS_COUNT;
-    u_int8_t col = random_empty_cell_index % CELLS_COUNT;
+    uint8_t row = random_empty_cell_index / CELLS_COUNT;
+    uint8_t col = random_empty_cell_index % CELLS_COUNT;
 
 
     int random_value_percent = random() % 100;
     int random_value_percent = random() % 100;
     game_state->table[row][col] = random_value_percent < 90 ? 1 : 2; // 90% for 2, 25% for 4
     game_state->table[row][col] = random_value_percent < 90 ? 1 : 2; // 90% for 2, 25% for 4
@@ -339,7 +339,7 @@ bool is_game_over(GameState* const game_state) {
 
 
     // check if table contains at least one empty cell
     // check if table contains at least one empty cell
     for(uint8_t i = 0; i < CELLS_COUNT; i++) {
     for(uint8_t i = 0; i < CELLS_COUNT; i++) {
-        for(u_int8_t j = 0; j < CELLS_COUNT; j++) {
+        for(uint8_t j = 0; j < CELLS_COUNT; j++) {
             if(game_state->table[i][j] == 0) {
             if(game_state->table[i][j] == 0) {
                 FURI_LOG_I("is_game_over", "has empty cells");
                 FURI_LOG_I("is_game_over", "has empty cells");
                 return false;
                 return false;

+ 1 - 1
base_pack/heap_defence_game/application.fam

@@ -9,6 +9,6 @@ App(
     fap_icon="box.png",
     fap_icon="box.png",
     fap_icon_assets="assets_images",
     fap_icon_assets="assets_images",
     fap_author="@xMasterX (original implementation by @wquinoa & @Vedmein)",
     fap_author="@xMasterX (original implementation by @wquinoa & @Vedmein)",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_description="Heap Defence game from hackathon (aka Stack Attack)",
     fap_description="Heap Defence game from hackathon (aka Stack Attack)",
 )
 )

+ 1 - 1
base_pack/heap_defence_game/heap_defence.c

@@ -50,7 +50,7 @@ typedef enum {
 
 
 static IconAnimation* animations[4];
 static IconAnimation* animations[4];
 
 
-typedef u_int8_t byte;
+typedef uint8_t byte;
 
 
 typedef enum {
 typedef enum {
     GameStatusVibro = 1 << 0,
     GameStatusVibro = 1 << 0,

+ 1 - 1
base_pack/mousejacker/application.fam

@@ -12,7 +12,7 @@ App(
     fap_icon="mouse_10px.png",
     fap_icon="mouse_10px.png",
     fap_category="GPIO",
     fap_category="GPIO",
     fap_author="@mothball187 & @xMasterX",
     fap_author="@mothball187 & @xMasterX",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_description="App works with NRF24 Sniffer app to perform mousejack attacks",
     fap_description="App works with NRF24 Sniffer app to perform mousejack attacks",
     fap_icon_assets="images",
     fap_icon_assets="images",
     fap_private_libs=[
     fap_private_libs=[

+ 3 - 3
base_pack/mousejacker/mousejacker_ducky.c

@@ -97,7 +97,7 @@ static uint32_t mj_ducky_get_command_len(const char* line) {
 
 
 static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
 static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
     //FURI_LOG_D(TAG, "looking up key %s with length %d", key, keylen);
     //FURI_LOG_D(TAG, "looking up key %s with length %d", key, keylen);
-    for(uint i = 0; i < sizeof(mj_ducky_keys) / sizeof(MJDuckyKey); i++) {
+    for(size_t i = 0; i < sizeof(mj_ducky_keys) / sizeof(MJDuckyKey); i++) {
         if(strlen(mj_ducky_keys[i].name) == keylen &&
         if(strlen(mj_ducky_keys[i].name) == keylen &&
            !strncmp(mj_ducky_keys[i].name, key, keylen)) {
            !strncmp(mj_ducky_keys[i].name, key, keylen)) {
             memcpy(dk, &mj_ducky_keys[i], sizeof(MJDuckyKey));
             memcpy(dk, &mj_ducky_keys[i], sizeof(MJDuckyKey));
@@ -108,11 +108,11 @@ static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
     return false;
     return false;
 }
 }
 
 
-static void checksum(uint8_t* payload, uint len) {
+static void checksum(uint8_t* payload, size_t len) {
     // This is also from the KeyKeriki paper
     // This is also from the KeyKeriki paper
     // Thanks Thorsten and Max!
     // Thanks Thorsten and Max!
     uint8_t cksum = 0xff;
     uint8_t cksum = 0xff;
-    for(uint n = 0; n < len - 2; n++) cksum = (cksum - payload[n]) & 0xff;
+    for(size_t n = 0; n < len - 2; n++) cksum = (cksum - payload[n]) & 0xff;
     cksum = (cksum + 1) & 0xff;
     cksum = (cksum + 1) & 0xff;
     payload[len - 1] = cksum;
     payload[len - 1] = cksum;
 }
 }

+ 1 - 1
base_pack/picopass/scenes/picopass_scene_read_card_success.c

@@ -138,7 +138,7 @@ void picopass_scene_read_card_success_on_enter(void* context) {
 
 
         if(no_key) {
         if(no_key) {
             furi_string_cat_printf(key_str, "No Key: used NR-MAC");
             furi_string_cat_printf(key_str, "No Key: used NR-MAC");
-        } else if(pacs->key) {
+        } else {
             furi_string_cat_printf(key_str, "Key: ");
             furi_string_cat_printf(key_str, "Key: ");
             uint8_t key[PICOPASS_BLOCK_LEN];
             uint8_t key[PICOPASS_BLOCK_LEN];
             memcpy(key, &pacs->key, PICOPASS_BLOCK_LEN);
             memcpy(key, &pacs->key, PICOPASS_BLOCK_LEN);

+ 4 - 8
base_pack/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c

@@ -122,15 +122,11 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
                 app->log_file_path,
                 app->log_file_path,
                 sequential_file_resolve_path(
                 sequential_file_resolve_path(
                     app->storage, MARAUDER_APP_FOLDER_LOGS, prefix, "log"));
                     app->storage, MARAUDER_APP_FOLDER_LOGS, prefix, "log"));
-            if(app->log_file_path != NULL) {
-                if(storage_file_open(
-                       app->log_file, app->log_file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
-                    app->is_writing_log = true;
-                } else {
-                    dialog_message_show_storage_error(app->dialogs, "Cannot open log file");
-                }
+            if(storage_file_open(
+                   app->log_file, app->log_file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
+                app->is_writing_log = true;
             } else {
             } else {
-                dialog_message_show_storage_error(app->dialogs, "Cannot resolve log path");
+                dialog_message_show_storage_error(app->dialogs, "Cannot open log file");
             }
             }
         }
         }
 
 

+ 3 - 3
non_catalog_apps/FlipBIP/helpers/flipbip_file.c

@@ -39,12 +39,12 @@ bool flipbip_load_file(
     const char* file_name) {
     const char* file_name) {
     bool ret = false;
     bool ret = false;
     const char* path;
     const char* path;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipBipFileKey) {
     if(file_type == FlipBipFileKey) {
         path = FLIPBIP_KEY_PATH;
         path = FLIPBIP_KEY_PATH;
     } else if(file_type == FlipBipFileDat) {
     } else if(file_type == FlipBipFileDat) {
         path = FLIPBIP_DAT_PATH;
         path = FLIPBIP_DAT_PATH;
     } else {
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
         strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);
         strcpy(path_buf + strlen(path_buf), file_name);
@@ -96,12 +96,12 @@ bool flipbip_load_file(
 bool flipbip_has_file(const FlipBipFile file_type, const char* file_name, const bool remove) {
 bool flipbip_has_file(const FlipBipFile file_type, const char* file_name, const bool remove) {
     bool ret = false;
     bool ret = false;
     const char* path;
     const char* path;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipBipFileKey) {
     if(file_type == FlipBipFileKey) {
         path = FLIPBIP_KEY_PATH;
         path = FLIPBIP_KEY_PATH;
     } else if(file_type == FlipBipFileDat) {
     } else if(file_type == FlipBipFileDat) {
         path = FLIPBIP_DAT_PATH;
         path = FLIPBIP_DAT_PATH;
     } else {
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
         strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);
         strcpy(path_buf + strlen(path_buf), file_name);
@@ -127,6 +127,7 @@ bool flipbip_save_file(
     bool ret = false;
     bool ret = false;
     const char* path;
     const char* path;
     const char* path_bak;
     const char* path_bak;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipBipFileKey) {
     if(file_type == FlipBipFileKey) {
         path = FLIPBIP_KEY_PATH;
         path = FLIPBIP_KEY_PATH;
         path_bak = FLIPBIP_KEY_PATH_BAK;
         path_bak = FLIPBIP_KEY_PATH_BAK;
@@ -134,7 +135,6 @@ bool flipbip_save_file(
         path = FLIPBIP_DAT_PATH;
         path = FLIPBIP_DAT_PATH;
         path_bak = FLIPBIP_DAT_PATH_BAK;
         path_bak = FLIPBIP_DAT_PATH_BAK;
     } else {
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
         strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);
         strcpy(path_buf + strlen(path_buf), file_name);

+ 1 - 0
non_catalog_apps/airmouse/tracking/util/vector.h

@@ -17,6 +17,7 @@
 #define CARDBOARD_SDK_UTIL_VECTOR_H_
 #define CARDBOARD_SDK_UTIL_VECTOR_H_
 
 
 #include <array>
 #include <array>
+#include <cstddef>
 
 
 namespace cardboard {
 namespace cardboard {
 
 

+ 3 - 3
non_catalog_apps/chess/helpers/flipchess_file.c

@@ -16,10 +16,10 @@
 bool flipchess_has_file(const FlipChessFile file_type, const char* file_name, const bool remove) {
 bool flipchess_has_file(const FlipChessFile file_type, const char* file_name, const bool remove) {
     bool ret = false;
     bool ret = false;
     const char* path;
     const char* path;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipChessFileBoard) {
     if(file_type == FlipChessFileBoard) {
         path = FLIPCHESS_BOARD_PATH;
         path = FLIPCHESS_BOARD_PATH;
     } else {
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);
         strcpy(path_buf + strlen(path_buf), file_name);
@@ -40,10 +40,10 @@ bool flipchess_has_file(const FlipChessFile file_type, const char* file_name, co
 bool flipchess_load_file(char* contents, const FlipChessFile file_type, const char* file_name) {
 bool flipchess_load_file(char* contents, const FlipChessFile file_type, const char* file_name) {
     bool ret = false;
     bool ret = false;
     const char* path;
     const char* path;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipChessFileBoard) {
     if(file_type == FlipChessFileBoard) {
         path = FLIPCHESS_BOARD_PATH;
         path = FLIPCHESS_BOARD_PATH;
     } else {
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);
         strcpy(path_buf + strlen(path_buf), file_name);
@@ -99,11 +99,11 @@ bool flipchess_save_file(
     bool ret = false;
     bool ret = false;
     const char* path;
     const char* path;
     const char* path_bak;
     const char* path_bak;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipChessFileBoard) {
     if(file_type == FlipChessFileBoard) {
         path = FLIPCHESS_BOARD_PATH;
         path = FLIPCHESS_BOARD_PATH;
         path_bak = FLIPCHESS_BOARD_PATH_BAK;
         path_bak = FLIPCHESS_BOARD_PATH_BAK;
     } else {
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);
         strcpy(path_buf + strlen(path_buf), file_name);

+ 2 - 2
non_catalog_apps/chess/sam/stm32_sam.cpp

@@ -4510,7 +4510,7 @@ void STM32SAM::AdjustLengths() {
                 mem56 = flags[index];
                 mem56 = flags[index];
 
 
             // not a consonant
             // not a consonant
-            if((flags[index] & 64) == 0) {
+            if((mem56 & 64) == 0) {
                 // RX or LX?
                 // RX or LX?
                 if((index == 18) || (index == 19)) // 'RX' & 'LX'
                 if((index == 18) || (index == 19)) // 'RX' & 'LX'
                 {
                 {
@@ -4519,7 +4519,7 @@ void STM32SAM::AdjustLengths() {
                     index = phonemeindex[X];
                     index = phonemeindex[X];
 
 
                     // next phoneme a consonant?
                     // next phoneme a consonant?
-                    if((flags[index] & 64) != 0) {
+                    if((mem56 & 64) != 0) {
                         // RULE: <VOWEL> RX | LX <CONSONANT>
                         // RULE: <VOWEL> RX | LX <CONSONANT>
 
 
                         // decrease length of vowel by 1 frame
                         // decrease length of vowel by 1 frame

+ 1 - 0
non_catalog_apps/esubghz_chat/crypto_wrapper.c

@@ -1,6 +1,7 @@
 #include <furi_hal.h>
 #include <furi_hal.h>
 #include <lib/mlib/m-dict.h>
 #include <lib/mlib/m-dict.h>
 #include <mbedtls/sha256.h>
 #include <mbedtls/sha256.h>
+#include <machine/endian.h>
 
 
 #ifndef FURI_HAL_CRYPTO_ADVANCED_AVAIL
 #ifndef FURI_HAL_CRYPTO_ADVANCED_AVAIL
 #include "crypto/gcm.h"
 #include "crypto/gcm.h"

+ 4 - 4
non_catalog_apps/flipper_plane/game_state.c

@@ -29,11 +29,11 @@ void game_state_reinit(GameState* const game_state) {
 void check_collision(GameState* const game_state) {
 void check_collision(GameState* const game_state) {
     /*
     /*
         to make collision detection easier, 
         to make collision detection easier, 
-        convert the u_int16_t to an array of 
-        u_int8_t's
+        convert the uint16_t to an array of 
+        uint8_t's
     */
     */
-    u_int8_t currentRow[sizeof(uint16_t) * 8];
-    u_int16_t mapCopy = game_state->map[(int)game_state->paper->y + 3];
+    uint8_t currentRow[sizeof(uint16_t) * 8];
+    uint16_t mapCopy = game_state->map[(int)game_state->paper->y + 3];
     for(unsigned int j = 0; j < sizeof(uint16_t) * 8; j++) {
     for(unsigned int j = 0; j < sizeof(uint16_t) * 8; j++) {
         if(mapCopy & 0x8000) {
         if(mapCopy & 0x8000) {
             currentRow[j] = 1;
             currentRow[j] = 1;

+ 2 - 2
non_catalog_apps/flipper_plane/paperplane.c

@@ -63,11 +63,11 @@ static void render_callback(Canvas* const canvas, void* ctx) {
     float background_position = game_state->paper->y;
     float background_position = game_state->paper->y;
     for(int i = background_position; i < background_position + 10; i++) {
     for(int i = background_position; i < background_position + 10; i++) {
         /*
         /*
-            using a u_int32_t here so that bits 
+            using a uint32_t here so that bits 
             that have been shifted out can still 
             that have been shifted out can still 
             be read.
             be read.
         */
         */
-        u_int32_t currentRow = game_state->map[i];
+        uint32_t currentRow = game_state->map[i];
         for(unsigned int j = 0; j < sizeof(uint16_t) * 8; j++) {
         for(unsigned int j = 0; j < sizeof(uint16_t) * 8; j++) {
             /*
             /*
                 0x8000 is 1 with 15 zeros
                 0x8000 is 1 with 15 zeros

+ 8 - 0
non_catalog_apps/flizzer_tracker/flizzer_tracker.c

@@ -9,6 +9,8 @@
 #include "font.h"
 #include "font.h"
 #include <flizzer_tracker_icons.h>
 #include <flizzer_tracker_icons.h>
 
 
+#include <expansion/expansion.h>
+
 void draw_callback(Canvas* canvas, void* ctx) {
 void draw_callback(Canvas* canvas, void* ctx) {
     TrackerViewModel* model = (TrackerViewModel*)ctx;
     TrackerViewModel* model = (TrackerViewModel*)ctx;
     FlizzerTrackerApp* tracker = (FlizzerTrackerApp*)(model->tracker);
     FlizzerTrackerApp* tracker = (FlizzerTrackerApp*)(model->tracker);
@@ -98,6 +100,9 @@ bool input_callback(InputEvent* input_event, void* ctx) {
 int32_t flizzer_tracker_app(void* p) {
 int32_t flizzer_tracker_app(void* p) {
     UNUSED(p);
     UNUSED(p);
 
 
+    Expansion* expansion = furi_record_open(RECORD_EXPANSION);
+    expansion_disable(expansion);
+
     Storage* storage = furi_record_open(RECORD_STORAGE);
     Storage* storage = furi_record_open(RECORD_STORAGE);
     bool st = storage_simply_mkdir(storage, APPSDATA_FOLDER);
     bool st = storage_simply_mkdir(storage, APPSDATA_FOLDER);
     st = storage_simply_mkdir(storage, FLIZZER_TRACKER_FOLDER);
     st = storage_simply_mkdir(storage, FLIZZER_TRACKER_FOLDER);
@@ -214,5 +219,8 @@ int32_t flizzer_tracker_app(void* p) {
 
 
     deinit_tracker(tracker);
     deinit_tracker(tracker);
 
 
+    expansion_enable(expansion);
+    furi_record_close(RECORD_EXPANSION);
+
     return 0;
     return 0;
 }
 }

+ 0 - 4
non_catalog_apps/flizzer_tracker/sound_engine/sound_engine.c

@@ -14,10 +14,6 @@ void sound_engine_init(
         free(sound_engine->audio_buffer);
         free(sound_engine->audio_buffer);
     }
     }
 
 
-    if(sound_engine->sine_lut) {
-        free(sound_engine->sine_lut);
-    }
-
     memset(sound_engine, 0, sizeof(SoundEngine));
     memset(sound_engine, 0, sizeof(SoundEngine));
 
 
     sound_engine->audio_buffer = malloc(audio_buffer_size * sizeof(sound_engine->audio_buffer[0]));
     sound_engine->audio_buffer = malloc(audio_buffer_size * sizeof(sound_engine->audio_buffer[0]));

+ 7 - 7
non_catalog_apps/meal_pager/helpers/meal_pager_storage.c

@@ -202,7 +202,7 @@ void meal_pager_read_settings(void* context) {
     flipper_format_rewind(fff_file);
     flipper_format_rewind(fff_file);
 
 
     furi_string_free(temp_str);
     furi_string_free(temp_str);
-    
+
     meal_pager_close_config_file(fff_file);
     meal_pager_close_config_file(fff_file);
     meal_pager_close_storage();
     meal_pager_close_storage();
 }
 }
@@ -226,26 +226,26 @@ void meal_pager_set_max_values(void* context) {
     }
     }
     if(app->first_station > app->max_station) {
     if(app->first_station > app->max_station) {
         app->first_station = app->max_station;
         app->first_station = app->max_station;
-        snprintf(app->text_store[0], 5, "%lu", app->first_station);
+        snprintf(app->text_store[0], sizeof(app->text_store[0]), "%lu", app->first_station);
     }
     }
     if(app->last_station > app->max_station) {
     if(app->last_station > app->max_station) {
         app->last_station = app->max_station;
         app->last_station = app->max_station;
-        snprintf(app->text_store[1], 5, "%lu", app->last_station);
+        snprintf(app->text_store[1], sizeof(app->text_store[1]), "%lu", app->last_station);
     }
     }
     if(app->last_station < app->first_station) {
     if(app->last_station < app->first_station) {
         app->last_station = app->first_station;
         app->last_station = app->first_station;
-        snprintf(app->text_store[1], 5, "%lu", app->last_station);
+        snprintf(app->text_store[1], sizeof(app->text_store[1]), "%lu", app->last_station);
     }
     }
     if(app->first_pager > app->max_pager) {
     if(app->first_pager > app->max_pager) {
         app->first_pager = app->max_pager;
         app->first_pager = app->max_pager;
-        snprintf(app->text_store[2], 4, "%lu", app->first_pager);
+        snprintf(app->text_store[2], sizeof(app->text_store[2]), "%lu", app->first_pager);
     }
     }
     if(app->last_pager > app->max_pager) {
     if(app->last_pager > app->max_pager) {
         app->last_pager = app->max_pager;
         app->last_pager = app->max_pager;
-        snprintf(app->text_store[3], 4, "%lu", app->last_pager);
+        snprintf(app->text_store[3], sizeof(app->text_store[3]), "%lu", app->last_pager);
     }
     }
     if(app->last_pager < app->first_pager) {
     if(app->last_pager < app->first_pager) {
         app->last_pager = app->first_pager;
         app->last_pager = app->first_pager;
-        snprintf(app->text_store[3], 4, "%lu", app->last_pager);
+        snprintf(app->text_store[3], sizeof(app->text_store[3]), "%lu", app->last_pager);
     }
     }
 }
 }

+ 3 - 3
non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_t119.c

@@ -67,7 +67,7 @@ static void meal_pager_retekess_t119_generate_pager(
     //FURI_LOG_D(TAG, "Manchester: %s", manchester);
     //FURI_LOG_D(TAG, "Manchester: %s", manchester);
     char* rawSignal = genRawDataT119(200, 600, manchester);
     char* rawSignal = genRawDataT119(200, 600, manchester);
     //FURI_LOG_D(TAG, "RAW_Data: %s", rawSignal);
     //FURI_LOG_D(TAG, "RAW_Data: %s", rawSignal);
-    for(u_int32_t i = 1; app->repeats >= i; i++) {
+    for(uint32_t i = 1; app->repeats >= i; i++) {
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
     }
     }
     //flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
     //flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
@@ -90,7 +90,7 @@ static void
     uint32ToBinaray(station, stationId, 13);
     uint32ToBinaray(station, stationId, 13);
     reverse(stationId);
     reverse(stationId);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
-    for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
+    for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
         meal_pager_retekess_t119_generate_pager(app, stationId, i, ff);
         meal_pager_retekess_t119_generate_pager(app, stationId, i, ff);
         //furi_thread_flags_wait(0, FuriFlagWaitAny, 1);
         //furi_thread_flags_wait(0, FuriFlagWaitAny, 1);
         if(app->stop_transmit) {
         if(app->stop_transmit) {
@@ -117,7 +117,7 @@ bool meal_pager_retekess_t119_generate_all(void* context) {
         return success;
         return success;
     }
     }
 
 
-    for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
+    for(uint32_t i = app->current_station; i <= app->last_station; i++) {
         meal_pager_retekess_t119_generate_station(app, i, ff);
         meal_pager_retekess_t119_generate_station(app, i, ff);
         //furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
         //furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
         if(app->stop_transmit) {
         if(app->stop_transmit) {

+ 3 - 3
non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_td157.c

@@ -55,7 +55,7 @@ static void meal_pager_retekess_td157_generate_pager(
     customConcat(fullId, actionId);
     customConcat(fullId, actionId);
     char* manchester = encManchester(fullId, 0);
     char* manchester = encManchester(fullId, 0);
     char* rawSignal = genRawDataTD157(200, 600, manchester);
     char* rawSignal = genRawDataTD157(200, 600, manchester);
-    for(u_int32_t i = 1; app->repeats >= i; i++) {
+    for(uint32_t i = 1; app->repeats >= i; i++) {
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
     }
     }
     free(manchester);
     free(manchester);
@@ -77,7 +77,7 @@ static void
     uint32ToBinaray(station, stationId, 10);
     uint32ToBinaray(station, stationId, 10);
     //reverse(stationId);
     //reverse(stationId);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
-    for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
+    for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
         meal_pager_retekess_td157_generate_pager(app, stationId, i, ff);
         meal_pager_retekess_td157_generate_pager(app, stationId, i, ff);
         if(app->stop_transmit) {
         if(app->stop_transmit) {
             break;
             break;
@@ -103,7 +103,7 @@ bool meal_pager_retekess_td157_generate_all(void* context) {
         return success;
         return success;
     }
     }
 
 
-    for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
+    for(uint32_t i = app->current_station; i <= app->last_station; i++) {
         meal_pager_retekess_td157_generate_station(app, i, ff);
         meal_pager_retekess_td157_generate_station(app, i, ff);
         if(app->stop_transmit) {
         if(app->stop_transmit) {
             break;
             break;

+ 3 - 3
non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_td165.c

@@ -57,7 +57,7 @@ static void meal_pager_retekess_td165_generate_pager(
     customConcat(fullId, actionId);
     customConcat(fullId, actionId);
     char* manchester = encManchester(fullId, 0);
     char* manchester = encManchester(fullId, 0);
     char* rawSignal = genRawDataTD165(200, 600, manchester);
     char* rawSignal = genRawDataTD165(200, 600, manchester);
-    for(u_int32_t i = 1; app->repeats >= i; i++) {
+    for(uint32_t i = 1; app->repeats >= i; i++) {
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
     }
     }
     free(manchester);
     free(manchester);
@@ -79,7 +79,7 @@ static void
     uint32ToBinaray(station, stationId, 13);
     uint32ToBinaray(station, stationId, 13);
     reverse(stationId);
     reverse(stationId);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
-    for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
+    for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
         meal_pager_retekess_td165_generate_pager(app, stationId, i, ff);
         meal_pager_retekess_td165_generate_pager(app, stationId, i, ff);
         if(app->stop_transmit) {
         if(app->stop_transmit) {
             break;
             break;
@@ -105,7 +105,7 @@ bool meal_pager_retekess_td165_generate_all(void* context) {
         return success;
         return success;
     }
     }
 
 
-    for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
+    for(uint32_t i = app->current_station; i <= app->last_station; i++) {
         meal_pager_retekess_td165_generate_station(app, i, ff);
         meal_pager_retekess_td165_generate_station(app, i, ff);
         if(app->stop_transmit) {
         if(app->stop_transmit) {
             break;
             break;

+ 3 - 3
non_catalog_apps/meal_pager/helpers/retekess/meal_pager_retekess_td174.c

@@ -60,7 +60,7 @@ static void meal_pager_retekess_td174_generate_pager(
     customConcat(fullId, pagerId);
     customConcat(fullId, pagerId);
     char* manchester = encManchester(fullId, 0);
     char* manchester = encManchester(fullId, 0);
     char* rawSignal = genRawDataTd174(300, 900, manchester);
     char* rawSignal = genRawDataTd174(300, 900, manchester);
-    for(u_int32_t i = 1; app->repeats >= i; i++) {
+    for(uint32_t i = 1; app->repeats >= i; i++) {
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
         flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
     }
     }
     free(manchester);
     free(manchester);
@@ -82,7 +82,7 @@ static void
     uint32ToBinaray(station, stationId, 13);
     uint32ToBinaray(station, stationId, 13);
     reverse(stationId);
     reverse(stationId);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
     meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
-    for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
+    for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
         meal_pager_retekess_td174_generate_pager(app, stationId, i, ff);
         meal_pager_retekess_td174_generate_pager(app, stationId, i, ff);
         if(app->stop_transmit) {
         if(app->stop_transmit) {
             break;
             break;
@@ -108,7 +108,7 @@ bool meal_pager_retekess_td174_generate_all(void* context) {
         return success;
         return success;
     }
     }
 
 
-    for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
+    for(uint32_t i = app->current_station; i <= app->last_station; i++) {
         meal_pager_retekess_td174_generate_station(app, i, ff);
         meal_pager_retekess_td174_generate_station(app, i, ff);
         //furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
         //furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
         if(app->stop_transmit) {
         if(app->stop_transmit) {

+ 1 - 1
non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_first_pager.c

@@ -43,7 +43,7 @@ bool meal_pager_scene_set_first_pager_on_event(void* context, SceneManagerEvent
         app->first_pager = atoi(app->text_store[2]);
         app->first_pager = atoi(app->text_store[2]);
         if(app->first_pager > app->max_pager) {
         if(app->first_pager > app->max_pager) {
             app->first_pager = app->max_pager;
             app->first_pager = app->max_pager;
-            snprintf(app->text_store[2], 4, "%lu", app->first_pager);
+            snprintf(app->text_store[2], sizeof(app->text_store[2]), "%lu", app->first_pager);
         }
         }
         app->first_pager_char = app->text_store[2];
         app->first_pager_char = app->text_store[2];
         scene_manager_previous_scene(app->scene_manager);
         scene_manager_previous_scene(app->scene_manager);

+ 1 - 1
non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_first_station.c

@@ -43,7 +43,7 @@ bool meal_pager_scene_set_first_station_on_event(void* context, SceneManagerEven
         app->first_station = atoi(app->text_store[0]);
         app->first_station = atoi(app->text_store[0]);
         if(app->first_station > app->max_station) {
         if(app->first_station > app->max_station) {
             app->first_station = app->max_station;
             app->first_station = app->max_station;
-            snprintf(app->text_store[0], 5, "%lu", app->first_station);
+            snprintf(app->text_store[0], sizeof(app->text_store[0]), "%lu", app->first_station);
         }
         }
         app->first_station_char = app->text_store[0];
         app->first_station_char = app->text_store[0];
         scene_manager_previous_scene(app->scene_manager);
         scene_manager_previous_scene(app->scene_manager);

+ 2 - 2
non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_last_pager.c

@@ -43,11 +43,11 @@ bool meal_pager_scene_set_last_pager_on_event(void* context, SceneManagerEvent e
         app->last_pager = atoi(app->text_store[3]);
         app->last_pager = atoi(app->text_store[3]);
         if(app->last_pager > app->max_pager) {
         if(app->last_pager > app->max_pager) {
             app->last_pager = app->max_pager;
             app->last_pager = app->max_pager;
-            snprintf(app->text_store[3], 4, "%lu", app->last_pager);
+            snprintf(app->text_store[3], sizeof(app->text_store[3]), "%lu", app->last_pager);
         }
         }
         if(app->last_pager < app->first_pager) {
         if(app->last_pager < app->first_pager) {
             app->last_pager = app->first_pager;
             app->last_pager = app->first_pager;
-            snprintf(app->text_store[3], 4, "%lu", app->last_pager);
+            snprintf(app->text_store[3], sizeof(app->text_store[3]), "%lu", app->last_pager);
         }
         }
         app->last_pager_char = app->text_store[3];
         app->last_pager_char = app->text_store[3];
         scene_manager_previous_scene(app->scene_manager);
         scene_manager_previous_scene(app->scene_manager);

+ 2 - 2
non_catalog_apps/meal_pager/scenes/meal_pager_scene_set_last_station.c

@@ -43,11 +43,11 @@ bool meal_pager_scene_set_last_station_on_event(void* context, SceneManagerEvent
         app->last_station = atoi(app->text_store[1]);
         app->last_station = atoi(app->text_store[1]);
         if(app->last_station > app->max_station) {
         if(app->last_station > app->max_station) {
             app->last_station = app->max_station;
             app->last_station = app->max_station;
-            snprintf(app->text_store[1], 5, "%lu", app->last_station);
+            snprintf(app->text_store[1], sizeof(app->text_store[1]), "%lu", app->last_station);
         }
         }
         if(app->last_station < app->first_station) {
         if(app->last_station < app->first_station) {
             app->last_station = app->first_station;
             app->last_station = app->first_station;
-            snprintf(app->text_store[1], 5, "%lu", app->last_station);
+            snprintf(app->text_store[1], sizeof(app->text_store[1]), "%lu", app->last_station);
         }
         }
         app->last_station_char = app->text_store[1];
         app->last_station_char = app->text_store[1];
         scene_manager_previous_scene(app->scene_manager);
         scene_manager_previous_scene(app->scene_manager);

+ 3 - 3
non_catalog_apps/mousejacker_ms/mousejacker_ducky.c

@@ -87,7 +87,7 @@ static uint32_t mj_ducky_get_command_len(const char* line) {
 
 
 static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
 static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
     //FURI_LOG_D(TAG, "looking up key %s with length %d", key, keylen);
     //FURI_LOG_D(TAG, "looking up key %s with length %d", key, keylen);
-    for(uint i = 0; i < sizeof(mj_ducky_keys) / sizeof(MJDuckyKey); i++) {
+    for(size_t i = 0; i < sizeof(mj_ducky_keys) / sizeof(MJDuckyKey); i++) {
         if(!strncmp(mj_ducky_keys[i].name, key, keylen)) {
         if(!strncmp(mj_ducky_keys[i].name, key, keylen)) {
             memcpy(dk, &mj_ducky_keys[i], sizeof(MJDuckyKey));
             memcpy(dk, &mj_ducky_keys[i], sizeof(MJDuckyKey));
             return true;
             return true;
@@ -97,10 +97,10 @@ static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
     return false;
     return false;
 }
 }
 
 
-static void checksum(uint8_t* payload, uint len) {
+static void checksum(uint8_t* payload, size_t len) {
     // MS checksum algorithm - as per KeyKeriki paper
     // MS checksum algorithm - as per KeyKeriki paper
     payload[len - 1] = 0x00;
     payload[len - 1] = 0x00;
-    for(uint n = 0; n < len - 2; n++) payload[len - 1] ^= payload[n];
+    for(size_t n = 0; n < len - 2; n++) payload[len - 1] ^= payload[n];
     payload[len - 1] = ~payload[len - 1] & 0xff;
     payload[len - 1] = ~payload[len - 1] & 0xff;
 }
 }
 
 

+ 80 - 80
non_catalog_apps/sudoku/sudoku.c

@@ -84,7 +84,7 @@ const uint8_t u8g2_font_tom_thumb_4x6_tr[725] =
     "y\11\227\307$\225dJ\0z\7\223\310\254\221\6{\10\227\310\251\32D\1|\6\265\310(\1}\11"
     "y\11\227\307$\225dJ\0z\7\223\310\254\221\6{\10\227\310\251\32D\1|\6\265\310(\1}\11"
     "\227\310\310\14RR\0~\6\213\313\215\4\0\0\0\4\377\377\0";
     "\227\310\310\14RR\0~\6\213\313\215\4\0\0\0\4\377\377\0";
 
 
-static int get_mode_gaps(int index) {
+static int32_t get_mode_gaps(int32_t index) {
     if(index <= 0) {
     if(index <= 0) {
         return EASY_GAPS;
         return EASY_GAPS;
     }
     }
@@ -138,8 +138,8 @@ static void save_game(SudokuState* app) {
 // inspired by game_2048
 // inspired by game_2048
 static void gray_canvas(Canvas* const canvas) {
 static void gray_canvas(Canvas* const canvas) {
     canvas_set_color(canvas, ColorWhite);
     canvas_set_color(canvas, ColorWhite);
-    for(int x = 0, mx = canvas_width(canvas); x < mx; x += 2) {
-        for(int y = 0, my = canvas_height(canvas); y != my; y++) {
+    for(int32_t x = 0, mx = canvas_width(canvas); x < mx; x += 2) {
+        for(int32_t y = 0, my = canvas_height(canvas); y != my; y++) {
             canvas_draw_dot(canvas, x + (y % 2 == 1 ? 0 : 1), y);
             canvas_draw_dot(canvas, x + (y % 2 == 1 ? 0 : 1), y);
         }
         }
     }
     }
@@ -152,11 +152,11 @@ static void draw_callback(Canvas* canvas, void* ctx) {
     canvas_clear(canvas);
     canvas_clear(canvas);
     canvas_set_custom_u8g2_font(canvas, u8g2_font_tom_thumb_4x6_tr);
     canvas_set_custom_u8g2_font(canvas, u8g2_font_tom_thumb_4x6_tr);
 
 
-    int gapX = 0;
-    int xOffset = 2;
-    int yOffset = -2;
-    for(int i = 0; i != BOARD_SIZE; ++i) {
-        int gapY = 0;
+    int32_t gapX = 0;
+    int32_t xOffset = 2;
+    int32_t yOffset = -2;
+    for(int32_t i = 0; i != BOARD_SIZE; ++i) {
+        int32_t gapY = 0;
         bool vflag = state->vertivalFlags & (1 << i);
         bool vflag = state->vertivalFlags & (1 << i);
         if((i % 3) == 0) gapX += 2;
         if((i % 3) == 0) gapX += 2;
         if(vflag) {
         if(vflag) {
@@ -169,7 +169,7 @@ static void draw_callback(Canvas* canvas, void* ctx) {
                 i * FONT_SIZE + gapX + xOffset + FONT_SIZE - 3,
                 i * FONT_SIZE + gapX + xOffset + FONT_SIZE - 3,
                 0);
                 0);
         }
         }
-        for(int j = 0; j != BOARD_SIZE; ++j) {
+        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
             if((j % 3) == 0) gapY += 4;
             if((j % 3) == 0) gapY += 4;
             canvas_set_color(canvas, ColorBlack);
             canvas_set_color(canvas, ColorBlack);
             if(i == 0) {
             if(i == 0) {
@@ -187,7 +187,7 @@ static void draw_callback(Canvas* canvas, void* ctx) {
             bool userInput = state->board[i][j] & USER_INPUT_FLAG;
             bool userInput = state->board[i][j] & USER_INPUT_FLAG;
             bool cursor = i == state->cursorX && j == state->cursorY;
             bool cursor = i == state->cursorX && j == state->cursorY;
             if(!userInput) {
             if(!userInput) {
-                int xBoxOffset = cursor ? -1 : 0;
+                int32_t xBoxOffset = cursor ? -1 : 0;
                 // draw black box around the locked number
                 // draw black box around the locked number
                 canvas_draw_box(
                 canvas_draw_box(
                     canvas,
                     canvas,
@@ -206,7 +206,7 @@ static void draw_callback(Canvas* canvas, void* ctx) {
                     FONT_SIZE + 1,
                     FONT_SIZE + 1,
                     FONT_SIZE + 1);
                     FONT_SIZE + 1);
             }
             }
-            int value = state->board[i][j] & VALUE_MASK;
+            int32_t value = state->board[i][j] & VALUE_MASK;
             if(value != 0) {
             if(value != 0) {
                 canvas_draw_glyph(
                 canvas_draw_glyph(
                     canvas,
                     canvas,
@@ -218,9 +218,9 @@ static void draw_callback(Canvas* canvas, void* ctx) {
     }
     }
     canvas_set_color(canvas, ColorBlack);
     canvas_set_color(canvas, ColorBlack);
     gapX = 0;
     gapX = 0;
-    int gapY = 0;
+    int32_t gapY = 0;
     yOffset = 2;
     yOffset = 2;
-    for(int i = 1; i != BOARD_SIZE / 3; ++i) {
+    for(int32_t i = 1; i != BOARD_SIZE / 3; ++i) {
         gapX += i;
         gapX += i;
         gapY += i * 2;
         gapY += i * 2;
         // vertical lines
         // vertical lines
@@ -242,20 +242,20 @@ static void draw_callback(Canvas* canvas, void* ctx) {
     if(state->state == GameStateVictory || state->state == GameStatePaused) {
     if(state->state == GameStateVictory || state->state == GameStatePaused) {
         gray_canvas(canvas);
         gray_canvas(canvas);
         canvas_set_color(canvas, ColorWhite);
         canvas_set_color(canvas, ColorWhite);
-        int w = canvas_width(canvas);
-        int h = canvas_height(canvas);
-        int winW = 58;
-        int winH = 48;
-        int winX = (w - winW) / 2;
-        int winY = (h - winH) / 2;
+        int32_t w = canvas_width(canvas);
+        int32_t h = canvas_height(canvas);
+        int32_t winW = 58;
+        int32_t winH = 48;
+        int32_t winX = (w - winW) / 2;
+        int32_t winY = (h - winH) / 2;
         canvas_draw_rbox(canvas, winX, winY, winW, winH, 4);
         canvas_draw_rbox(canvas, winX, winY, winW, winH, 4);
         canvas_set_color(canvas, ColorBlack);
         canvas_set_color(canvas, ColorBlack);
         canvas_draw_rframe(canvas, winX, winY, winW, winH, 4);
         canvas_draw_rframe(canvas, winX, winY, winW, winH, 4);
 
 
-        int offX = 6;
-        int offY = 3;
-        int itemH = FONT_SIZE + 2;
-        for(int i = 0; i < MENU_ITEMS_COUNT; i++) {
+        int32_t offX = 6;
+        int32_t offY = 3;
+        int32_t itemH = FONT_SIZE + 2;
+        for(int32_t i = 0; i < MENU_ITEMS_COUNT; i++) {
             if(i == state->menuCursor) {
             if(i == state->menuCursor) {
                 canvas_set_color(canvas, ColorBlack);
                 canvas_set_color(canvas, ColorBlack);
                 canvas_draw_box(
                 canvas_draw_box(
@@ -283,12 +283,12 @@ static void input_callback(InputEvent* input_event, void* ctx) {
 
 
 // static void print_board(SudokuState* state) {
 // static void print_board(SudokuState* state) {
 //     char buf[BOARD_SIZE * 2 + 1];
 //     char buf[BOARD_SIZE * 2 + 1];
-//     for(int i = 0; i < BOARD_SIZE * 2; ++i) {
+//     for(int32_t i = 0; i < BOARD_SIZE * 2; ++i) {
 //         buf[i] = ' ';
 //         buf[i] = ' ';
 //     }
 //     }
 //     buf[BOARD_SIZE * 2] = 0;
 //     buf[BOARD_SIZE * 2] = 0;
-//     for(int i = 0; i != BOARD_SIZE; ++i) {
-//         for(int j = 0; j != BOARD_SIZE; ++j) {
+//     for(int32_t i = 0; i != BOARD_SIZE; ++i) {
+//         for(int32_t j = 0; j != BOARD_SIZE; ++j) {
 //             buf[j * 2] = state->board[j][i] == 0 ? '_' : '0' + state->board[j][i];
 //             buf[j * 2] = state->board[j][i] == 0 ? '_' : '0' + state->board[j][i];
 //         }
 //         }
 //         FURI_LOG_D(TAG, "%s", buf);
 //         FURI_LOG_D(TAG, "%s", buf);
@@ -296,24 +296,24 @@ static void input_callback(InputEvent* input_event, void* ctx) {
 // }
 // }
 
 
 static void init_board(SudokuState* state) {
 static void init_board(SudokuState* state) {
-    for(int i = 0; i != BOARD_SIZE; ++i) {
-        for(int j = 0; j != BOARD_SIZE; ++j) {
+    for(int32_t i = 0; i != BOARD_SIZE; ++i) {
+        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
             state->board[i][j] = 1 + (i * BOARD_SIZE_3 + i / 3 + j) % 9;
             state->board[i][j] = 1 + (i * BOARD_SIZE_3 + i / 3 + j) % 9;
         }
         }
     }
     }
 }
 }
 
 
-static void shuffle_board(SudokuState* state, int times) {
+static void shuffle_board(SudokuState* state, int32_t times) {
     uint8_t tmp[BOARD_SIZE];
     uint8_t tmp[BOARD_SIZE];
-    for(int t = 0; t < times; ++t) {
+    for(int32_t t = 0; t < times; ++t) {
         // swap numbers
         // swap numbers
-        int swapX, swapY;
+        int32_t swapX, swapY;
         do {
         do {
             swapX = 1 + furi_hal_random_get() % BOARD_SIZE;
             swapX = 1 + furi_hal_random_get() % BOARD_SIZE;
             swapY = 1 + furi_hal_random_get() % BOARD_SIZE;
             swapY = 1 + furi_hal_random_get() % BOARD_SIZE;
         } while(swapX == swapY);
         } while(swapX == swapY);
-        for(int i = 0; i != BOARD_SIZE; ++i) {
-            for(int j = 0; j != BOARD_SIZE; ++j) {
+        for(int32_t i = 0; i != BOARD_SIZE; ++i) {
+            for(int32_t j = 0; j != BOARD_SIZE; ++j) {
                 if(state->board[i][j] == swapX) {
                 if(state->board[i][j] == swapX) {
                     state->board[i][j] = swapY;
                     state->board[i][j] = swapY;
                 } else if(state->board[i][j] == swapY) {
                 } else if(state->board[i][j] == swapY) {
@@ -322,9 +322,9 @@ static void shuffle_board(SudokuState* state, int times) {
             }
             }
         }
         }
         // swap columns
         // swap columns
-        for(int i = 0; i != BOARD_SIZE_3; ++i) {
-            int swapX, swapY;
-            int offset = i * BOARD_SIZE_3;
+        for(int32_t i = 0; i != BOARD_SIZE_3; ++i) {
+            int32_t swapX, swapY;
+            int32_t offset = i * BOARD_SIZE_3;
             do {
             do {
                 swapX = offset + furi_hal_random_get() % BOARD_SIZE_3;
                 swapX = offset + furi_hal_random_get() % BOARD_SIZE_3;
                 swapY = offset + furi_hal_random_get() % BOARD_SIZE_3;
                 swapY = offset + furi_hal_random_get() % BOARD_SIZE_3;
@@ -334,23 +334,23 @@ static void shuffle_board(SudokuState* state, int times) {
             memcpy(state->board[swapY], tmp, BOARD_SIZE);
             memcpy(state->board[swapY], tmp, BOARD_SIZE);
         }
         }
         // swap rows
         // swap rows
-        for(int i = 0; i != BOARD_SIZE_3; ++i) {
-            int swapX, swapY;
-            int offset = i * BOARD_SIZE_3;
+        for(int32_t i = 0; i != BOARD_SIZE_3; ++i) {
+            int32_t swapX, swapY;
+            int32_t offset = i * BOARD_SIZE_3;
             do {
             do {
                 swapX = offset + furi_hal_random_get() % BOARD_SIZE_3;
                 swapX = offset + furi_hal_random_get() % BOARD_SIZE_3;
                 swapY = offset + furi_hal_random_get() % BOARD_SIZE_3;
                 swapY = offset + furi_hal_random_get() % BOARD_SIZE_3;
             } while(swapX == swapY);
             } while(swapX == swapY);
-            for(int k = 0; k != BOARD_SIZE; ++k) {
+            for(int32_t k = 0; k != BOARD_SIZE; ++k) {
                 FURI_SWAP(state->board[k][swapX], state->board[k][swapY]);
                 FURI_SWAP(state->board[k][swapX], state->board[k][swapY]);
             }
             }
         }
         }
     }
     }
 }
 }
 
 
-static void add_gaps(SudokuState* state, int inputCells) {
-    for(int i = 0; i <= inputCells; ++i) {
-        int x, y;
+static void add_gaps(SudokuState* state, int32_t inputCells) {
+    for(int32_t i = 0; i <= inputCells; ++i) {
+        int32_t x, y;
         do {
         do {
             x = furi_hal_random_get() % BOARD_SIZE;
             x = furi_hal_random_get() % BOARD_SIZE;
             y = furi_hal_random_get() % BOARD_SIZE;
             y = furi_hal_random_get() % BOARD_SIZE;
@@ -363,11 +363,11 @@ static bool validate_board(SudokuState* state) {
     bool res = true;
     bool res = true;
     // check vertical lines for duplicates
     // check vertical lines for duplicates
     state->vertivalFlags = 0;
     state->vertivalFlags = 0;
-    for(int i = 0; i != BOARD_SIZE; ++i) {
-        uint flags = 0;
+    for(int32_t i = 0; i != BOARD_SIZE; ++i) {
+        uint32_t flags = 0;
         bool ok = true;
         bool ok = true;
-        for(int j = 0; j != BOARD_SIZE; ++j) {
-            int value = state->board[i][j] & VALUE_MASK;
+        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
+            int32_t value = state->board[i][j] & VALUE_MASK;
             if(value == 0) {
             if(value == 0) {
                 ok = false;
                 ok = false;
                 res = false;
                 res = false;
@@ -384,11 +384,11 @@ static bool validate_board(SudokuState* state) {
     }
     }
     // check horizontal lines for duplicates
     // check horizontal lines for duplicates
     state->horizontalFlags = 0;
     state->horizontalFlags = 0;
-    for(int i = 0; i != BOARD_SIZE; ++i) {
+    for(int32_t i = 0; i != BOARD_SIZE; ++i) {
         bool ok = true;
         bool ok = true;
-        uint flags = 0;
-        for(int j = 0; j != BOARD_SIZE; ++j) {
-            int value = state->board[j][i] & VALUE_MASK;
+        uint32_t flags = 0;
+        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
+            int32_t value = state->board[j][i] & VALUE_MASK;
             if(value == 0) {
             if(value == 0) {
                 ok = false;
                 ok = false;
                 res = false;
                 res = false;
@@ -407,13 +407,13 @@ static bool validate_board(SudokuState* state) {
         return res;
         return res;
     }
     }
     // check 3x3 squares for duplicates
     // check 3x3 squares for duplicates
-    for(int i = 0; i != BOARD_SIZE_3; ++i) {
-        for(int j = 0; j != BOARD_SIZE_3; ++j) {
-            uint flags = 0;
-            for(int k = 0; k != BOARD_SIZE_3; ++k) {
-                for(int l = 0; l != BOARD_SIZE_3; ++l) {
-                    int value = state->board[i * BOARD_SIZE_3 + k][j * BOARD_SIZE_3 + l] &
-                                VALUE_MASK;
+    for(int32_t i = 0; i != BOARD_SIZE_3; ++i) {
+        for(int32_t j = 0; j != BOARD_SIZE_3; ++j) {
+            uint32_t flags = 0;
+            for(int32_t k = 0; k != BOARD_SIZE_3; ++k) {
+                for(int32_t l = 0; l != BOARD_SIZE_3; ++l) {
+                    int32_t value = state->board[i * BOARD_SIZE_3 + k][j * BOARD_SIZE_3 + l] &
+                                    VALUE_MASK;
                     if(flags & (1 << value)) {
                     if(flags & (1 << value)) {
                         return false;
                         return false;
                     }
                     }
@@ -426,12 +426,12 @@ static bool validate_board(SudokuState* state) {
 }
 }
 
 
 // fast validation, checks only one given cell
 // fast validation, checks only one given cell
-static bool board_cell_is_valid(SudokuState* state, int x, int y) {
+static bool board_cell_is_valid(SudokuState* state, int32_t x, int32_t y) {
     // check vertical lines for duplicates
     // check vertical lines for duplicates
     {
     {
-        uint flags = 0;
-        for(int j = 0; j != BOARD_SIZE; ++j) {
-            int value = state->board[x][j];
+        uint32_t flags = 0;
+        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
+            int32_t value = state->board[x][j];
             if(value == 0) {
             if(value == 0) {
                 continue;
                 continue;
             }
             }
@@ -443,9 +443,9 @@ static bool board_cell_is_valid(SudokuState* state, int x, int y) {
     }
     }
     // check horizontal lines for duplicates
     // check horizontal lines for duplicates
     {
     {
-        uint flags = 0;
-        for(int j = 0; j != BOARD_SIZE; ++j) {
-            int value = state->board[j][y];
+        uint32_t flags = 0;
+        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
+            int32_t value = state->board[j][y];
             if(value == 0) {
             if(value == 0) {
                 continue;
                 continue;
             }
             }
@@ -458,12 +458,12 @@ static bool board_cell_is_valid(SudokuState* state, int x, int y) {
     // check 3x3 squares for duplicates
     // check 3x3 squares for duplicates
     {
     {
         {
         {
-            int p = x - x % BOARD_SIZE_3;
-            int q = y - y % BOARD_SIZE_3;
-            uint flags = 0;
-            for(int k = 0; k != BOARD_SIZE_3; ++k) {
-                for(int l = 0; l != BOARD_SIZE_3; ++l) {
-                    int value = state->board[p + k][q + l];
+            int32_t p = x - x % BOARD_SIZE_3;
+            int32_t q = y - y % BOARD_SIZE_3;
+            uint32_t flags = 0;
+            for(int32_t k = 0; k != BOARD_SIZE_3; ++k) {
+                for(int32_t l = 0; l != BOARD_SIZE_3; ++l) {
+                    int32_t value = state->board[p + k][q + l];
                     if(value == 0) {
                     if(value == 0) {
                         continue;
                         continue;
                     }
                     }
@@ -478,7 +478,7 @@ static bool board_cell_is_valid(SudokuState* state, int x, int y) {
     return true;
     return true;
 }
 }
 
 
-static bool solve_board(SudokuState* state, int x, int y) {
+static bool solve_board(SudokuState* state, int32_t x, int32_t y) {
     if(x == BOARD_SIZE) {
     if(x == BOARD_SIZE) {
         x = 0;
         x = 0;
         if(++y == BOARD_SIZE) {
         if(++y == BOARD_SIZE) {
@@ -494,8 +494,8 @@ static bool solve_board(SudokuState* state, int x, int y) {
             }
             }
         }
         }
     }
     }
-    int offset = furi_hal_random_get() % BOARD_SIZE;
-    for(int val = 1; val <= BOARD_SIZE; ++val) {
+    int32_t offset = furi_hal_random_get() % BOARD_SIZE;
+    for(int32_t val = 1; val <= BOARD_SIZE; ++val) {
         state->board[x][y] = (val + offset) % BOARD_SIZE + 1;
         state->board[x][y] = (val + offset) % BOARD_SIZE + 1;
         if(board_cell_is_valid(state, x, y) && solve_board(state, x + 1, y)) {
         if(board_cell_is_valid(state, x, y) && solve_board(state, x + 1, y)) {
             return true;
             return true;
@@ -516,9 +516,9 @@ static bool start_game(SudokuState* state) {
     state->cursorY = 0;
     state->cursorY = 0;
     state->blockInputUntilRelease = false;
     state->blockInputUntilRelease = false;
     bool generated = false;
     bool generated = false;
-    for(int i = 0; i != 3; i++) {
+    for(int32_t i = 0; i != 3; i++) {
         if(generate_board(state)) {
         if(generate_board(state)) {
-            FURI_LOG_D(TAG, "generate_board success on %d iteration", i);
+            FURI_LOG_D(TAG, "generate_board success on %ld iteration", i);
             generated = true;
             generated = true;
             break;
             break;
         }
         }
@@ -634,8 +634,8 @@ int32_t sudoku_main(void* p) {
                     break;
                     break;
                 case InputKeyOk:
                 case InputKeyOk:
                     if(userInput && !state->blockInputUntilRelease) {
                     if(userInput && !state->blockInputUntilRelease) {
-                        int flags = state->board[state->cursorX][state->cursorY] & FLAGS_MASK;
-                        int value = state->board[state->cursorX][state->cursorY] & VALUE_MASK;
+                        int32_t flags = state->board[state->cursorX][state->cursorY] & FLAGS_MASK;
+                        int32_t value = state->board[state->cursorX][state->cursorY] & VALUE_MASK;
                         state->board[state->cursorX][state->cursorY] = flags | ((value + 1) % 10);
                         state->board[state->cursorX][state->cursorY] = flags | ((value + 1) % 10);
                         invalidField = true;
                         invalidField = true;
                     }
                     }
@@ -651,8 +651,8 @@ int32_t sudoku_main(void* p) {
                     dolphin_deed(DolphinDeedPluginGameWin);
                     dolphin_deed(DolphinDeedPluginGameWin);
                     state->state = GameStateVictory;
                     state->state = GameStateVictory;
                     state->menuCursor = 0;
                     state->menuCursor = 0;
-                    for(int i = 0; i != BOARD_SIZE; ++i) {
-                        for(int j = 0; j != BOARD_SIZE; ++j) {
+                    for(int32_t i = 0; i != BOARD_SIZE; ++i) {
+                        for(int32_t j = 0; j != BOARD_SIZE; ++j) {
                             state->board[i][j] &= ~USER_INPUT_FLAG;
                             state->board[i][j] &= ~USER_INPUT_FLAG;
                         }
                         }
                     }
                     }

+ 23 - 25
non_catalog_apps/tanksgame/tanks_game.c

@@ -1371,32 +1371,30 @@ int32_t tanks_game_app(void* p) {
                         memset(incomingMessage, 0x00, message_max_len);
                         memset(incomingMessage, 0x00, message_max_len);
                         subghz_tx_rx_worker_read(subghz_txrx, incomingMessage, message_max_len);
                         subghz_tx_rx_worker_read(subghz_txrx, incomingMessage, message_max_len);
 
 
-                        if(incomingMessage != NULL) {
-                            tanks_state->received++;
+                        tanks_state->received++;
 
 
-                            switch(incomingMessage[0]) {
-                            case GoesUp:
-                                tanks_state->p2->moving = true;
-                                tanks_state->p2->direction = DirectionUp;
-                                break;
-                            case GoesRight:
-                                tanks_state->p2->moving = true;
-                                tanks_state->p2->direction = DirectionRight;
-                                break;
-                            case GoesDown:
-                                tanks_state->p2->moving = true;
-                                tanks_state->p2->direction = DirectionDown;
-                                break;
-                            case GoesLeft:
-                                tanks_state->p2->moving = true;
-                                tanks_state->p2->direction = DirectionLeft;
-                                break;
-                            case Shoots:
-                                tanks_state->p2->shooting = true;
-                                break;
-                            default:
-                                break;
-                            }
+                        switch(incomingMessage[0]) {
+                        case GoesUp:
+                            tanks_state->p2->moving = true;
+                            tanks_state->p2->direction = DirectionUp;
+                            break;
+                        case GoesRight:
+                            tanks_state->p2->moving = true;
+                            tanks_state->p2->direction = DirectionRight;
+                            break;
+                        case GoesDown:
+                            tanks_state->p2->moving = true;
+                            tanks_state->p2->direction = DirectionDown;
+                            break;
+                        case GoesLeft:
+                            tanks_state->p2->moving = true;
+                            tanks_state->p2->direction = DirectionLeft;
+                            break;
+                        case Shoots:
+                            tanks_state->p2->shooting = true;
+                            break;
+                        default:
+                            break;
                         }
                         }
                     }
                     }
 
 

+ 2 - 2
non_catalog_apps/ublox/ublox_device.c

@@ -104,15 +104,15 @@ UbloxFrame* ublox_bytes_to_frame(UbloxMessage* message) {
 
 
     if(ck_a != frame->ck_a) {
     if(ck_a != frame->ck_a) {
         FURI_LOG_E(TAG, "checksum A doesn't match! expected 0x%x, got 0x%x", ck_a, frame->ck_a);
         FURI_LOG_E(TAG, "checksum A doesn't match! expected 0x%x, got 0x%x", ck_a, frame->ck_a);
-        free(frame);
         free(frame->payload);
         free(frame->payload);
+        free(frame);
         return NULL;
         return NULL;
     }
     }
 
 
     if(ck_b != frame->ck_b) {
     if(ck_b != frame->ck_b) {
         FURI_LOG_E(TAG, "checksum B doesn't match! expected 0x%x, got 0x%x", ck_b, frame->ck_b);
         FURI_LOG_E(TAG, "checksum B doesn't match! expected 0x%x, got 0x%x", ck_b, frame->ck_b);
-        free(frame);
         free(frame->payload);
         free(frame->payload);
+        free(frame);
         return NULL;
         return NULL;
     }
     }
 
 

+ 1 - 1
non_catalog_apps/vexed/draw.c

@@ -12,7 +12,7 @@
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
-u_int32_t frameNo = 0;
+uint32_t frameNo = 0;
 int r1 = 0, r2 = 0;
 int r1 = 0, r2 = 0;
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 5 - 5
non_catalog_apps/vexed/game.h

@@ -58,11 +58,11 @@ typedef enum {
 } GameOver;
 } GameOver;
 
 
 typedef struct {
 typedef struct {
-    u_int32_t frameNo;
-    u_int32_t dir;
-    u_int32_t x;
-    u_int32_t y;
-    u_int32_t delay;
+    uint32_t frameNo;
+    uint32_t dir;
+    uint32_t x;
+    uint32_t y;
+    uint32_t delay;
 } MoveInfo;
 } MoveInfo;
 
 
 typedef struct {
 typedef struct {

+ 9 - 0
non_catalog_apps/video_player/video_player.c

@@ -9,6 +9,7 @@
 #include <cli/cli.h>
 #include <cli/cli.h>
 #include <gui/gui.h>
 #include <gui/gui.h>
 #include "furi_hal_rtc.h"
 #include "furi_hal_rtc.h"
+#include <expansion/expansion.h>
 
 
 void draw_callback(Canvas* canvas, void* ctx) {
 void draw_callback(Canvas* canvas, void* ctx) {
     PlayerViewModel* model = (PlayerViewModel*)ctx;
     PlayerViewModel* model = (PlayerViewModel*)ctx;
@@ -105,6 +106,9 @@ void draw_all(VideoPlayerApp* player) {
 int32_t video_player_app(void* p) {
 int32_t video_player_app(void* p) {
     UNUSED(p);
     UNUSED(p);
 
 
+    Expansion* expansion = furi_record_open(RECORD_EXPANSION);
+    expansion_disable(expansion);
+
     Storage* storage = furi_record_open(RECORD_STORAGE);
     Storage* storage = furi_record_open(RECORD_STORAGE);
     bool st = storage_simply_mkdir(storage, APPSDATA_FOLDER);
     bool st = storage_simply_mkdir(storage, APPSDATA_FOLDER);
     st = storage_simply_mkdir(storage, VIDEO_PLAYER_FOLDER);
     st = storage_simply_mkdir(storage, VIDEO_PLAYER_FOLDER);
@@ -194,6 +198,8 @@ int32_t video_player_app(void* p) {
             if(player->quit) {
             if(player->quit) {
                 deinit_player(player);
                 deinit_player(player);
                 player_deinit_hardware();
                 player_deinit_hardware();
+                expansion_enable(expansion);
+                furi_record_close(RECORD_EXPANSION);
                 return 0;
                 return 0;
             }
             }
 
 
@@ -316,5 +322,8 @@ int32_t video_player_app(void* p) {
         player_deinit_hardware();
         player_deinit_hardware();
     }
     }
 
 
+    expansion_enable(expansion);
+    furi_record_close(RECORD_EXPANSION);
+
     return 0;
     return 0;
 }
 }

+ 2 - 2
non_catalog_apps/wch_swio_flasher/views/debugger_emulator.c

@@ -42,14 +42,14 @@ typedef struct {
     uint16_t animation_visible;
     uint16_t animation_visible;
 } DebuggerEmulatorModel;
 } DebuggerEmulatorModel;
 
 
-static void draw_log0(Canvas* canvas, u_int8_t x, uint8_t y) {
+static void draw_log0(Canvas* canvas, uint8_t x, uint8_t y) {
     canvas_draw_line(canvas, x, y + 1, x, y + 3);
     canvas_draw_line(canvas, x, y + 1, x, y + 3);
     canvas_draw_line(canvas, x + 3, y + 1, x + 3, y + 3);
     canvas_draw_line(canvas, x + 3, y + 1, x + 3, y + 3);
     canvas_draw_line(canvas, x + 1, y, x + 2, y);
     canvas_draw_line(canvas, x + 1, y, x + 2, y);
     canvas_draw_line(canvas, x + 1, y + 4, x + 2, y + 4);
     canvas_draw_line(canvas, x + 1, y + 4, x + 2, y + 4);
 }
 }
 
 
-static void draw_log1(Canvas* canvas, u_int8_t x, uint8_t y) {
+static void draw_log1(Canvas* canvas, uint8_t x, uint8_t y) {
     canvas_draw_line(canvas, x, y, x, y + 4);
     canvas_draw_line(canvas, x, y, x, y + 4);
 }
 }