Cast char to int and use xrealloc instead of just realloc
authorRobert Pengelly <robertapengelly@hotmail.com>
Sat, 23 May 2026 09:25:17 +0000 (10:25 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Sat, 23 May 2026 09:25:17 +0000 (10:25 +0100)
parse.c
pp.c

diff --git a/parse.c b/parse.c
index ff6b82ad265a9896ba436548f610f0342bdf45e7..6b887af3d67dbd6e0de25c46df704da7540f6177 100644 (file)
--- 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 70ade30b62d53f8d4076a6641dc6a9e8296413ba..31df3be0e245e2d3e5681d8af84ce11abf27d687 100755 (executable)
--- 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;
                             }