mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Generate C code for if-else-if.
Also remove redundant parentheses in "if ((x bin_op y))", to avoid triggering a clang -Wparentheses-equality warning.
This commit is contained in:
1 parent
a81752647c
commit
2d0f9d7669
4 files changed
+43
-18
No files matched your search
+5
-2
@@ -217,8 +217,9 @@ puffs_gif_status puffs_gif_lzw_decoder_decode(puffs_gif_lzw_decoder* self,
|
||||
v_n_bits = 0;
|
||||
v_clear_code = (((uint32_t)(1)) << self->f_literal_width);
|
||||
v_width = (self->f_literal_width + 1);
|
||||
label_0_continue:;
|
||||
while (1) {
|
||||
while ((v_n_bits < v_width)) {
|
||||
while (v_n_bits < v_width) {
|
||||
if (a_src->ri >= a_src->wi) {
|
||||
status = puffs_gif_status_short_read;
|
||||
goto cleanup0;
|
||||
@@ -230,8 +231,10 @@ puffs_gif_status puffs_gif_lzw_decoder_decode(puffs_gif_lzw_decoder* self,
|
||||
v_code = PUFFS_LOW_BITS(v_bits, v_width);
|
||||
v_bits >>= v_width;
|
||||
v_n_bits -= v_width;
|
||||
if ((v_code < v_clear_code)) {
|
||||
if (v_code < v_clear_code) {
|
||||
goto label_0_break;
|
||||
} else if (v_code == v_clear_code) {
|
||||
goto label_0_continue;
|
||||
}
|
||||
goto label_0_break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user