From: Robert Pengelly Date: Sat, 23 May 2026 09:25:17 +0000 (+0100) Subject: Cast char to int and use xrealloc instead of just realloc X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=820e4cb234e9e25291be70319e22cdda2258acff;p=scc.git Cast char to int and use xrealloc instead of just realloc --- diff --git a/parse.c b/parse.c index ff6b82a..6b887af 100644 --- a/parse.c +++ b/parse.c @@ -23393,7 +23393,7 @@ static void emit_call_pointer_in_reg_now (const char *fn_reg, const char *result fflush (arg_tmp_ofp); state->ofp = arg_saved_ofp; - new_arg_tmp_ofps = (FILE **) realloc (arg_tmp_ofps, sizeof (*arg_tmp_ofps) * (argc + 1)); + new_arg_tmp_ofps = (FILE **) xrealloc (arg_tmp_ofps, sizeof (*arg_tmp_ofps) * (argc + 1)); if (new_arg_tmp_ofps) { @@ -23795,7 +23795,7 @@ static void emit_call_identifier_to_reg_now (const char *name, const char *reg, fflush (arg_tmp_ofp); state->ofp = arg_saved_ofp; - new_arg_tmp_ofps = (FILE **) realloc (arg_tmp_ofps, sizeof (*arg_tmp_ofps) * (argc + 1)); + new_arg_tmp_ofps = (FILE **) xrealloc (arg_tmp_ofps, sizeof (*arg_tmp_ofps) * (argc + 1)); if (new_arg_tmp_ofps) { @@ -28457,7 +28457,7 @@ static int parse_identifier_assignment_statement (void) { fflush (arg_tmp_ofp); state->ofp = arg_saved_ofp; - new_arg_tmp_ofps = (FILE **) realloc (arg_tmp_ofps, sizeof (*arg_tmp_ofps) * (argc + 1)); + new_arg_tmp_ofps = (FILE **) xrealloc (arg_tmp_ofps, sizeof (*arg_tmp_ofps) * (argc + 1)); if (new_arg_tmp_ofps) { diff --git a/pp.c b/pp.c index 70ade30..31df3be 100755 --- a/pp.c +++ b/pp.c @@ -1320,7 +1320,7 @@ struct vector *preprocess_line (char **line, char *real_start, char *real_caret, while (!is_end_of_line[(int) *caret]) { - if (!isspace (*caret)) { + if (!isspace ((int) *caret)) { break; }