From 5a866286c542a63f9f94084738ce9cad9dd694e4 Mon Sep 17 00:00:00 2001 From: Liu Date: Sun, 22 Dec 2024 22:53:32 +0800 Subject: [PATCH] style: clear uninitialized warnings --- lib/css/src/value.c | 2 +- lib/pandagl/src/text/text.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/css/src/value.c b/lib/css/src/value.c index dd431467e..f4cf41971 100644 --- a/lib/css/src/value.c +++ b/lib/css/src/value.c @@ -299,7 +299,7 @@ static int css_valdef_parser_commit(css_valdef_parser_t *parser, css_valdef_sign_t sign) { css_valdef_t *parent_valdef; - css_valdef_t *deleted_valdef; + css_valdef_t *deleted_valdef = NULL; css_valdef_t *child; // TODO: 处理 && 和 || 混写情况 diff --git a/lib/pandagl/src/text/text.c b/lib/pandagl/src/text/text.c index 41d222ad5..ac3519e31 100644 --- a/lib/pandagl/src/text/text.c +++ b/lib/pandagl/src/text/text.c @@ -436,7 +436,7 @@ void pd_text_set_insert_position(pd_text_t *text, int line_num, int col) int pd_text_set_insert_pixel_position(pd_text_t *text, int x, int y) { pd_text_line_t *line; - int i, pixel_pos, ins_x, ins_y; + int i, pixel_pos, ins_x, ins_y = 0; pixel_pos = text->offset_y; for (i = 0; i < text->lines_length; ++i) {