From 5151c8776507baf002a5901c3890da666915a9bd Mon Sep 17 00:00:00 2001 From: Gavin Howard Date: Fri, 4 Oct 2019 18:06:25 -0600 Subject: [PATCH] Fix style --- .gitignore | 3 +++ include/bc.h | 2 +- src/program.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 32ae591d..e63cd78d 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ perf.data.old *.gcov *.html *.profraw + +cscope*.out +tags diff --git a/include/bc.h b/include/bc.h index f9f92c89..62f2f568 100644 --- a/include/bc.h +++ b/include/bc.h @@ -66,7 +66,7 @@ typedef struct BcLexKeyword { #define BC_LEX_KW_LEN(kw) ((size_t) ((kw)->data & ~(BC_LEX_CHAR_MSB(1)))) #define BC_LEX_KW_ENTRY(a, b, c) \ - { .data = ((b) & ~(BC_LEX_CHAR_MSB(1))) | BC_LEX_CHAR_MSB(c),.name = a } + { .data = ((b) & ~(BC_LEX_CHAR_MSB(1))) | BC_LEX_CHAR_MSB(c), .name = a } extern const BcLexKeyword bc_lex_kws[]; extern const size_t bc_lex_kws_len; diff --git a/src/program.c b/src/program.c index 2b6f8183..ba5fa0e6 100644 --- a/src/program.c +++ b/src/program.c @@ -284,6 +284,7 @@ static BcStatus bc_program_operand(BcProgram *p, BcResult **r, #endif // BC_PROG_NO_STACK_CHECK *r = bc_vec_item_rev(&p->results, idx); + #if BC_ENABLED if (BC_ERR((*r)->t == BC_RESULT_VOID)) return bc_vm_err(BC_ERROR_EXEC_VOID_VAL); @@ -722,7 +723,7 @@ static BcStatus bc_program_copyToVar(BcProgram *p, size_t idx, BcStatus s = BC_STATUS_SUCCESS; BcResult *ptr, r; BcVec *vec; - BcNum *n; + BcNum *n = NULL; bool var = (t == BC_TYPE_VAR); #if BC_ENABLED