From e76ce1b40b306c39b2c06def181987e402b426a9 Mon Sep 17 00:00:00 2001 From: Florian Grousset Date: Fri, 30 Dec 2022 19:59:01 -0600 Subject: [PATCH] More code error fixes --- applications/plugins/calculator/tinyexpr.c | 5 +++-- applications/plugins/tama_p1/hal.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/plugins/calculator/tinyexpr.c b/applications/plugins/calculator/tinyexpr.c index e1d1c834e..cfd4cb8ab 100644 --- a/applications/plugins/calculator/tinyexpr.c +++ b/applications/plugins/calculator/tinyexpr.c @@ -278,10 +278,11 @@ void next_token(state* s) { s->type = TOK_NUMBER; } else { /* Look for a variable or builtin function call. */ - if(isalpha(s->next[0])) { + if(isalpha((int)s->next[0])) { const char* start; start = s->next; - while(isalpha(s->next[0]) || isdigit(s->next[0]) || (s->next[0] == '_')) s->next++; + while(isalpha((int)s->next[0]) || isdigit((int)s->next[0]) || (s->next[0] == '_')) + s->next++; const te_variable* var = find_lookup(s, start, s->next - start); if(!var) var = find_builtin(start, s->next - start); diff --git a/applications/plugins/tama_p1/hal.c b/applications/plugins/tama_p1/hal.c index b4638a84a..7c07c5252 100644 --- a/applications/plugins/tama_p1/hal.c +++ b/applications/plugins/tama_p1/hal.c @@ -36,7 +36,7 @@ static bool_t tama_p1_hal_is_log_enabled(log_level_t level) { static void tama_p1_hal_log(log_level_t level, char* buff, ...) { if(!tama_p1_hal_is_log_enabled(level)) return; - FuriString* string; + FuriString* string = NULL; va_list args; va_start(args, buff); furi_string_cat_vprintf(string, buff, args);