Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
276c959b
Commit
276c959b
authored
Sep 03, 2020
by
Evgeniy Isaev
Committed by
Mouse
Sep 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed `type-limits` warning (long & ulong values in constraints now have a suffix)
parent
0b1dc178
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
libasn1compiler/asn1c_constraint.c
libasn1compiler/asn1c_constraint.c
+7
-7
No files found.
libasn1compiler/asn1c_constraint.c
View file @
276c959b
...
@@ -528,11 +528,11 @@ emit_alphabet_check_loop(arg_t *arg, asn1cnst_range_t *range) {
...
@@ -528,11 +528,11 @@ emit_alphabet_check_loop(arg_t *arg, asn1cnst_range_t *range) {
}
}
static
void
static
void
abuf_oint
(
abuf
*
ab
,
asn1c_integer_t
v
)
{
abuf_oint
(
abuf
*
ab
,
asn1c_integer_t
v
,
asn1c_integer_t
natural_start
)
{
if
(
v
==
(
-
2147483647L
-
1
))
{
if
(
v
==
(
-
2147483647L
-
1
))
{
abuf_printf
(
ab
,
"(-2147483647L - 1)"
);
abuf_printf
(
ab
,
"(-2147483647L - 1)"
);
}
else
{
}
else
{
abuf_printf
(
ab
,
"%s
"
,
asn1p_itoa
(
v
)
);
abuf_printf
(
ab
,
"%s
%s"
,
asn1p_itoa
(
v
),
natural_start
?
"L"
:
"UL"
);
}
}
}
}
...
@@ -554,19 +554,19 @@ emit_range_comparison_code(asn1cnst_range_t *range, const char *varname,
...
@@ -554,19 +554,19 @@ emit_range_comparison_code(asn1cnst_range_t *range, const char *varname,
/* Empty constraint comparison */
/* Empty constraint comparison */
}
else
if
(
ignore_left
)
{
}
else
if
(
ignore_left
)
{
abuf_printf
(
ab
,
"%s <= "
,
varname
);
abuf_printf
(
ab
,
"%s <= "
,
varname
);
abuf_oint
(
ab
,
range
->
right
.
value
);
abuf_oint
(
ab
,
range
->
right
.
value
,
natural_start
);
}
else
if
(
ignore_right
)
{
}
else
if
(
ignore_right
)
{
abuf_printf
(
ab
,
"%s >= "
,
varname
);
abuf_printf
(
ab
,
"%s >= "
,
varname
);
abuf_oint
(
ab
,
range
->
left
.
value
);
abuf_oint
(
ab
,
range
->
left
.
value
,
natural_start
);
}
else
if
(
range
->
left
.
value
==
range
->
right
.
value
)
{
}
else
if
(
range
->
left
.
value
==
range
->
right
.
value
)
{
abuf_printf
(
ab
,
"%s == "
,
varname
);
abuf_printf
(
ab
,
"%s == "
,
varname
);
abuf_oint
(
ab
,
range
->
right
.
value
);
abuf_oint
(
ab
,
range
->
right
.
value
,
natural_start
);
}
else
{
}
else
{
abuf_printf
(
ab
,
"%s >= "
,
varname
);
abuf_printf
(
ab
,
"%s >= "
,
varname
);
abuf_oint
(
ab
,
range
->
left
.
value
);
abuf_oint
(
ab
,
range
->
left
.
value
,
natural_start
);
abuf_printf
(
ab
,
" && "
);
abuf_printf
(
ab
,
" && "
);
abuf_printf
(
ab
,
"%s <= "
,
varname
);
abuf_printf
(
ab
,
"%s <= "
,
varname
);
abuf_oint
(
ab
,
range
->
right
.
value
);
abuf_oint
(
ab
,
range
->
right
.
value
,
natural_start
);
}
}
}
else
{
}
else
{
for
(
int
i
=
0
;
i
<
range
->
el_count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
range
->
el_count
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment