aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-29 21:58:41 +0900
committernsfisis <nsfisis@gmail.com>2025-08-29 21:58:41 +0900
commit3244eb68cb12aacb5f262223d2c7b01e5f638e59 (patch)
tree2e484eb8473a68a303f9803f0f335f1c348c0d51 /src
parentb678465c11517a5342b1ec5aa4fe21570f13a3ed (diff)
downloadducc-3244eb68cb12aacb5f262223d2c7b01e5f638e59.tar.gz
ducc-3244eb68cb12aacb5f262223d2c7b01e5f638e59.tar.zst
ducc-3244eb68cb12aacb5f262223d2c7b01e5f638e59.zip
refactor: remove unused variables
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c1
-rw-r--r--src/parse.c2
-rw-r--r--src/preprocess.c2
3 files changed, 0 insertions, 5 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 2e7dc41..d66574f 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -257,7 +257,6 @@ static void codegen_assign_expr_helper(CodeGen* g, AstNode* ast) {
static void codegen_assign_expr(CodeGen* g, AstNode* ast) {
int sizeof_lhs = type_sizeof(ast->node_lhs->ty);
- int sizeof_rhs = type_sizeof(ast->node_rhs->ty);
codegen_expr(g, ast->node_lhs, GenMode_lval);
codegen_expr(g, ast->node_rhs, GenMode_rval);
diff --git a/src/parse.c b/src/parse.c
index ee194ae..381d7e1 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -476,7 +476,6 @@ static AstNode* create_new_postfix_inc_or_dec(Parser* p, AstNode* e, TokenKind o
static AstNode* parse_postfix_expr(Parser* p) {
AstNode* ret = parse_primary_expr(p);
while (1) {
- TokenKind tk = peek_token(p)->kind;
if (consume_token_if(p, TokenKind_paren_l)) {
AstNode* args = parse_arg_list(p);
expect(p, TokenKind_paren_r);
@@ -842,7 +841,6 @@ static AstNode* parse_assignment_expr(Parser* p) {
static AstNode* parse_comma_expr(Parser* p) {
AstNode* lhs = parse_assignment_expr(p);
while (1) {
- TokenKind op = peek_token(p)->kind;
if (consume_token_if(p, TokenKind_comma)) {
AstNode* rhs = parse_assignment_expr(p);
AstNode* list = ast_new_list(2);
diff --git a/src/preprocess.c b/src/preprocess.c
index fdc64d9..5c8d888 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -166,8 +166,6 @@ static void pplexer_tokenize_pp_directive(PpLexer* ppl, Token* tok) {
return;
}
- SourceLocation pp_directive_name_start_loc = ppl->src->loc;
-
StrBuilder builder;
strbuilder_init(&builder);
while (isalnum(infile_peek_char(ppl->src))) {