From 203e6088a192d247623d5675c778bf6f0c7fd457 Mon Sep 17 00:00:00 2001 From: Kristof Szabados <Kristof.Szabados@ericsson.com> Date: Fri, 22 May 2020 19:34:20 +0200 Subject: [PATCH] unnecessary assignment. Signed-off-by: Kristof Szabados <Kristof.Szabados@ericsson.com> --- compiler2/record.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler2/record.c b/compiler2/record.c index b559aaa05..b6bfc1207 100644 --- a/compiler2/record.c +++ b/compiler2/record.c @@ -4909,7 +4909,7 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) opt_elements++; } } - int bits = opt_elements+(sdef->oerExtendable == TRUE); + int needed_bytes; int pos = 8; @@ -4975,7 +4975,7 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) } if (sdef->oerExtendable && sdef->oerNrOrRootcomps != sdef->nElements) { - bits = 0; + int bits = 0; int eag_pos = 0; for (i = limit; i < sdef->nElements; i++) { if (sdef->oerEagNum != 0 && sdef->oerEag[eag_pos] == i - limit) { @@ -5115,7 +5115,7 @@ void defRecordClass1(const struct_def *sdef, output_struct *output) src = mputprintf(src, "int %s::OER_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf, OER_struct& p_oer)\n" "{\n", name); - bits = opt_elements+(sdef->oerExtendable == TRUE); + int bits = opt_elements+(sdef->oerExtendable == TRUE); needed_bytes = bits / 8 + (bits % 8 == 0 ? 0 : 1); if (needed_bytes != 0) { src = mputprintf(src, -- GitLab