From a18345024f86a5f40494c262123bd9ce7e21793d Mon Sep 17 00:00:00 2001 From: Kristof Szabados <Kristof.Szabados@ericsson.com> Date: Thu, 24 Nov 2016 12:45:27 +0100 Subject: [PATCH] XERdescriptor_t.xer_bits is actually unsigned long Signed-off-by: Kristof Szabados <Kristof.Szabados@ericsson.com> --- compiler2/record.c | 2 +- compiler2/record_of.c | 4 ++-- compiler2/union.c | 2 +- core2/Basetype2.cc | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler2/record.c b/compiler2/record.c index 82a709dbd..977fba9b9 100644 --- a/compiler2/record.c +++ b/compiler2/record.c @@ -2418,7 +2418,7 @@ void gen_xer(const struct_def *sdef, char **pdef, char **psrc) /* Remove XER_LIST, XER_RECOF from p_flavor. This is not required * for is_exer (which tests another bit), but for subsequent code. */ " int e_xer = is_exer(p_flavor);\n" - " int xerbits = p_td.xer_bits;\n" + " unsigned long xerbits = p_td.xer_bits;\n" " if (p_flavor & XER_TOPLEVEL) xerbits &= ~UNTAGGED;\n" " const boolean omit_tag = e_xer && ((xerbits & (UNTAGGED|XER_ATTRIBUTE)) " "|| (p_flavor & (USE_NIL|USE_TYPE_ATTR)));\n" diff --git a/compiler2/record_of.c b/compiler2/record_of.c index a20d9bf7e..4d335175c 100644 --- a/compiler2/record_of.c +++ b/compiler2/record_of.c @@ -1349,7 +1349,7 @@ void defRecordOfClass1(const struct_of_def *sdef, output_struct *output) "int %s::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& p_reader, " "unsigned int p_flavor, unsigned int p_flavor2, embed_values_dec_struct_t* emb_val)\n{\n" " boolean e_xer = is_exer(p_flavor);\n" - " int xerbits = p_td.xer_bits;\n" + " unsigned long xerbits = p_td.xer_bits;\n" " if (p_flavor & XER_TOPLEVEL) xerbits &= ~UNTAGGED;\n" " boolean own_tag = !(e_xer && ((xerbits & (ANY_ELEMENT|ANY_ATTRIBUTES|UNTAGGED))\n" " || (p_flavor & USE_TYPE_ATTR)));\n" /* incase the parent has USE-UNION */ @@ -2812,7 +2812,7 @@ void defRecordOfClassMemAllocOptimized(const struct_of_def *sdef, output_struct "int %s::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& p_reader, " "unsigned int p_flavor, unsigned int p_flavor2, embed_values_dec_struct_t* emb_val)\n{\n" " boolean e_xer = is_exer(p_flavor);\n" - " int xerbits = p_td.xer_bits;\n" + " unsigned long xerbits = p_td.xer_bits;\n" " if (p_flavor & XER_TOPLEVEL) xerbits &= ~UNTAGGED;\n" " boolean own_tag = !(e_xer && ((xerbits & (ANY_ELEMENT|ANY_ATTRIBUTES|UNTAGGED))" " || (p_flavor & USE_TYPE_ATTR)));\n" /* incase the parent has USE-UNION */ diff --git a/compiler2/union.c b/compiler2/union.c index 62f3c3543..1d6099097 100644 --- a/compiler2/union.c +++ b/compiler2/union.c @@ -1729,7 +1729,7 @@ void defUnionClass(struct_def const *sdef, output_struct *output) " int type = 0;\n" /* None */ " int rd_ok=1, xml_depth=-1;\n" "%s%s" - " int xerbits = p_td.xer_bits;\n" + " unsigned long xerbits = p_td.xer_bits;\n" " if (p_flavor & XER_TOPLEVEL) xerbits &= ~UNTAGGED;\n" " if (xerbits & USE_TYPE_ATTR) p_flavor &= ~XER_RECOF;\n" " boolean own_tag = !(e_xer && ((xerbits & (ANY_ELEMENT | UNTAGGED)) " diff --git a/core2/Basetype2.cc b/core2/Basetype2.cc index a77485d95..4a800d14d 100644 --- a/core2/Basetype2.cc +++ b/core2/Basetype2.cc @@ -2256,7 +2256,7 @@ int Record_Of_Type::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader, unsigned int flavor, unsigned int flavor2, embed_values_dec_struct_t* emb_val) { int exer = is_exer(flavor); - int xerbits = p_td.xer_bits; + unsigned long xerbits = p_td.xer_bits; if (flavor & XER_TOPLEVEL) xerbits &= ~UNTAGGED; boolean own_tag = !(exer && ((xerbits & (ANY_ELEMENT | ANY_ATTRIBUTES | UNTAGGED)) @@ -5142,7 +5142,7 @@ int Record_Type::XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader, int exer = is_exer(flavor); int success, type; int depth=-1; // depth of the start tag - int xerbits = p_td.xer_bits; + unsigned long xerbits = p_td.xer_bits; if (flavor & XER_TOPLEVEL) xerbits &= ~UNTAGGED; const boolean own_tag = !(exer && ( (xerbits & (ANY_ELEMENT | UNTAGGED | XER_ATTRIBUTE)) -- GitLab