diff --git a/applications/main/bad_usb/bad_usb_script.c b/applications/main/bad_usb/bad_usb_script.c index 0a4e90257..9bb5f465e 100644 --- a/applications/main/bad_usb/bad_usb_script.c +++ b/applications/main/bad_usb/bad_usb_script.c @@ -472,10 +472,10 @@ static int32_t ducky_script_execute_next(BadUsbScript* bad_usb, File* script_fil snprintf( bad_usb->st.error, sizeof(bad_usb->st.error), "Forbidden empty line"); FURI_LOG_E( - WORKER_TAG, "Forbidden empty line at line %lu", bad_usb->st.line_cur); + WORKER_TAG, "Forbidden empty line at line %u", bad_usb->st.line_cur); } else { FURI_LOG_E( - WORKER_TAG, "Unknown command at line %lu", bad_usb->st.line_cur); + WORKER_TAG, "Unknown command at line %u", bad_usb->st.line_cur); } return SCRIPT_STATE_ERROR; } else { diff --git a/applications/plugins/bpmtapper/bpm.c b/applications/plugins/bpmtapper/bpm.c index d1f7d3fd6..cee83a6a4 100644 --- a/applications/plugins/bpmtapper/bpm.c +++ b/applications/plugins/bpmtapper/bpm.c @@ -146,7 +146,7 @@ static void render_callback(Canvas* const canvas, void* ctx) { canvas_draw_str_aligned(canvas, 70, 10, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr)); furi_string_reset(tempStr); - furi_string_printf(tempStr, "Interval: %dms", bpm_state->interval); + furi_string_printf(tempStr, "Interval: %ldms", bpm_state->interval); canvas_draw_str_aligned(canvas, 5, 20, AlignLeft, AlignBottom, furi_string_get_cstr(tempStr)); furi_string_reset(tempStr); diff --git a/applications/plugins/chess/fast_chess.c b/applications/plugins/chess/fast_chess.c index c09b912b0..427a403ab 100644 --- a/applications/plugins/chess/fast_chess.c +++ b/applications/plugins/chess/fast_chess.c @@ -269,7 +269,7 @@ int toMinFen(char* fen, Position* position) { emptyCount++; } else { if(emptyCount != 0) { - snprintf(&fen[charCount++], 2, "%d", emptyCount); + snprintf(&fen[charCount++], 2, "%ls", emptyCount); emptyCount = 0; } fen[charCount++] = bb2char(bb, &(position->board)); @@ -278,7 +278,7 @@ int toMinFen(char* fen, Position* position) { file++; if(file > 7) { if(emptyCount != 0) { - snprintf(&fen[charCount++], 2, "%d", emptyCount); + snprintf(&fen[charCount++], 2, "%ls", emptyCount); emptyCount = 0; } file = 0; @@ -2357,7 +2357,7 @@ Node iterativeDeepeningAlphaBeta(Position* position, char depth, int alpha, int int score = iterativeDeepeningAlphaBeta(&newPosition, depth - 1, alpha, beta, FALSE).score; if(verbose) { - printf("%.2f\n", score / 100.00); + printf("%.2f\n", (double) score / (double) 100.00); fflush(stdout); } @@ -2850,8 +2850,8 @@ Move getAIMove(Game* game, int depth) { printf( " in %d seconds [%+.2f, %+.2f]\n", (int)(endTime - startTime), - staticEvaluation(&game->position) / 100.0, - node.score / 100.0); + (double) staticEvaluation(&game->position) / (double) 100.0, + (double) node.score / (double) 100.0); fflush(stdout); return node.move; diff --git a/applications/plugins/tanksgame/tanks_game.c b/applications/plugins/tanksgame/tanks_game.c index 632b4ecc3..3d67dfbb0 100644 --- a/applications/plugins/tanksgame/tanks_game.c +++ b/applications/plugins/tanksgame/tanks_game.c @@ -1236,7 +1236,7 @@ int32_t tanks_game_app(void* p) { tanks_state->menu_state = MenuStateCooperativeServerMode; } } else if(tanks_state->state == GameStateCooperativeClient) { - FuriString* goesUp; + FuriString* goesUp = NULL; char arr[2]; arr[0] = GoesUp; arr[1] = 0; @@ -1260,7 +1260,7 @@ int32_t tanks_game_app(void* p) { tanks_state->menu_state = MenuStateCooperativeClientMode; } } else if(tanks_state->state == GameStateCooperativeClient) { - FuriString* goesDown; + FuriString* goesDown = NULL; char arr[2]; arr[0] = GoesDown; arr[1] = 0; @@ -1277,7 +1277,7 @@ int32_t tanks_game_app(void* p) { break; case InputKeyRight: if(tanks_state->state == GameStateCooperativeClient) { - FuriString* goesRight; + FuriString* goesRight = NULL; char arr[2]; arr[0] = GoesRight; arr[1] = 0; @@ -1294,7 +1294,7 @@ int32_t tanks_game_app(void* p) { break; case InputKeyLeft: if(tanks_state->state == GameStateCooperativeClient) { - FuriString* goesLeft; + FuriString* goesLeft = NULL; char arr[2]; arr[0] = GoesLeft; arr[1] = 0; @@ -1327,7 +1327,7 @@ int32_t tanks_game_app(void* p) { } else if(tanks_state->state == GameStateGameOver) { tanks_game_init_game(tanks_state, tanks_state->state); } else if(tanks_state->state == GameStateCooperativeClient) { - FuriString* shoots; + FuriString* shoots = NULL; char arr[2]; arr[0] = Shoots; arr[1] = 0; @@ -1385,7 +1385,7 @@ int32_t tanks_game_app(void* p) { tanks_game_process_game_step(tanks_state); - FuriString* serializedData; + FuriString* serializedData = NULL; unsigned char* data = tanks_game_serialize(tanks_state); char arr[11 * 16 + 1];