Skip to content

Commit 7adc53f

Browse files
author
Nik Reist
committed
Fix error C4703 on VS 2019 build
1 parent 88f9609 commit 7adc53f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

expand.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static int print_macro_inf(
376376
* Enabled by '#pragma MCPP debug macro_call' or -K option in STD mode.
377377
*/
378378
{
379-
MACRO_INF * m_inf;
379+
MACRO_INF * m_inf = NULL;
380380
int num;
381381
int num_args; /* Number of actual args (maybe less than expected) */
382382
int i;
@@ -473,7 +473,7 @@ static char * replace(
473473
/* Number of actual arguments (maybe less than expected) */
474474
int enable_trace_macro; /* To exclude _Pragma() pseudo macro */
475475
int m_num = 0; /* 'mac_num' of current macro */
476-
MACRO_INF * m_inf; /* Pointer into mac_inf[] */
476+
MACRO_INF * m_inf = NULL; /* Pointer into mac_inf[] */
477477

478478
if (mcpp_debug & EXPAND) {
479479
dump_a_def( "replace entry", defp, FALSE, TRUE, fp_debug);
@@ -1187,7 +1187,7 @@ static char * remove_magics(
11871187
mac_n = arg_n = n = 0;
11881188

11891189
while ((*tp++ = c = get_ch()) != RT_END && file == infile) {
1190-
char ** loc_tab;
1190+
char ** loc_tab = NULL;
11911191
int num, mark, rm, magic;
11921192
size_t len;
11931193

@@ -1493,7 +1493,7 @@ static char * rescan(
14931493
char * tp = NULL; /* Temporary pointer into buffer*/
14941494
char * out_p = out; /* Current output pointer */
14951495
FILEINFO * file; /* Input sequences stacked on a "file" */
1496-
DEFBUF * inner; /* Inner macro to replace */
1496+
DEFBUF * inner = NULL; /* Inner macro to replace */
14971497
int c; /* First character of token */
14981498
int token_type;
14991499
char * mac_arg_start = NULL;
@@ -1771,8 +1771,8 @@ static int collect_args(
17711771
int nargs = 0; /* Number of collected args */
17721772
int var_arg = defp->nargs & VA_ARGS; /* Variable args */
17731773
int more_to_come = FALSE; /* Next argument is expected*/
1774-
LOCATION * locs; /* Location of args in source file */
1775-
LOCATION * loc; /* Current locs */
1774+
LOCATION * locs = NULL; /* Location of args in source file */
1775+
LOCATION * loc = NULL; /* Current locs */
17761776
MAGIC_SEQ mgc_prefix; /* MAC_INF seqs and spaces preceding an arg */
17771777
int c;
17781778

0 commit comments

Comments
 (0)