From cb12460b959ecb662f0fac610f0eaea0d9dbfe18 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Fri, 28 Dec 2012 12:54:20 +0000 Subject: [PATCH] Fix another Blub bug .. learn to use comments properly :P --- code.c | 2 +- ir.c | 4 +++- splint.sh | 1 - utf8.c | 10 +++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/code.c b/code.c index e6cd6a3..3590b41 100644 --- a/code.c +++ b/code.c @@ -53,7 +53,7 @@ void code_pop_statement() } void code_init() { - prog_section_function empty_function = {0,0,0,0,0,0,0,{0}}; + prog_section_function empty_function = {0,0,0,0,0,0,0,{0,0,0,0,0,0,0,0}}; prog_section_statement empty_statement = {0,{0},{0},{0}}; prog_section_def empty_def = {0, 0, 0}; int i = 0; diff --git a/ir.c b/ir.c index 6081b55..37f68f9 100644 --- a/ir.c +++ b/ir.c @@ -2481,7 +2481,9 @@ static bool ir_block_life_propagate(ir_block *self, ir_block *prev, bool *change size_t i, o, p, mem; /* bitmasks which operands are read from or written to */ size_t read, write; - char dbg_ind[16] = { '#', '0' }; + char dbg_ind[16]; + dbg_ind[0] = '#'; + dbg_ind[1] = '0'; (void)dbg_ind; if (prev) diff --git a/splint.sh b/splint.sh index e51b007..0aa2131 100755 --- a/splint.sh +++ b/splint.sh @@ -63,7 +63,6 @@ FLAGS_MAYBE="\ #these don't need to be here to onhibit the warning # remove one flag from here at a time while fixing the code so that FLAGS_TOFIX="\ - -initallelements \ -castfcnptr \ -evalorder" diff --git a/utf8.c b/utf8.c index 7a3f7dc..14510bc 100644 --- a/utf8.c +++ b/utf8.c @@ -47,11 +47,11 @@ static unsigned char utf8_lengths[256] = { }; static uchar_t utf8_range[5] = { - 1, /* invalid - let's not allow the creation of 0-bytes :P - 1, * ascii minimum - 0x80, * 2-byte minimum - 0x800, * 3-byte minimum - 0x10000, * 4-byte minimum */ + 1, /* invalid - let's not allow the creation of 0-bytes :P */ + 1, /* ascii minimum */ + 0x80, /* 2-byte minimum */ + 0x800, /* 3-byte minimum */ + 0x10000, /* 4-byte minimum */ }; /** Analyze the next character and return various information if requested. -- 2.39.2