File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1111#include "defs.h"
1212#include "globals.c"
1313
14- int elf_symbol_index ;
14+ int elf_symbol_index = 0 ;
1515
1616void elf_write_str (strbuf_t * elf_array , const char * vals )
1717{
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ char *intern_string(char *str);
1818
1919/* Lexer */
2020char token_str [MAX_TOKEN_LEN ];
21- token_t next_token ;
22- char next_char ;
21+ token_t next_token = 0 ;
22+ char next_char = 0 ;
2323bool skip_newline = true;
2424
2525/* Token memory management */
@@ -32,7 +32,7 @@ bool preproc_match;
3232/* Point to the first character after where the macro has been called. It is
3333 * needed when returning from the macro body.
3434 */
35- int macro_return_idx ;
35+ int macro_return_idx = 0 ;
3636
3737/* Global objects */
3838
@@ -1236,6 +1236,10 @@ void strbuf_free(strbuf_t *src)
12361236 */
12371237void global_init (void )
12381238{
1239+ FUNC_LIST .head = NULL ;
1240+ FUNC_LIST .tail = NULL ;
1241+ memset (REGS , 0 , sizeof (regfile_t ) * REG_CNT );
1242+
12391243 MACROS_MAP = hashmap_create (MAX_ALIASES );
12401244
12411245 /* Initialize arenas first so we can use them for allocation */
You can’t perform that action at this time.
0 commit comments