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
04abdb24
Commit
04abdb24
authored
Jan 10, 2016
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get rid of compiler warning of too smart compiler
parent
0f262452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
16 deletions
+22
-16
libasn1parser/asn1p_expr_str.h
libasn1parser/asn1p_expr_str.h
+11
-8
libasn1parser/expr-h.pl
libasn1parser/expr-h.pl
+11
-8
No files found.
libasn1parser/asn1p_expr_str.h
View file @
04abdb24
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
#ifndef ASN1_PARSER_EXPR_STR_H
#ifndef ASN1_PARSER_EXPR_STR_H
#define ASN1_PARSER_EXPR_STR_H
#define ASN1_PARSER_EXPR_STR_H
#include <assert.h>
#ifndef __GNUC__
#ifndef __GNUC__
#define __attribute__(x)
/* unused */
#define __attribute__(x)
/* unused */
#endif
#endif
...
@@ -49,13 +51,14 @@ static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
...
@@ -49,13 +51,14 @@ static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
/*
/*
* Convert the ASN.1 expression type back into the string representation.
* Convert the ASN.1 expression type back into the string representation.
*/
*/
#define ASN_EXPR_TYPE2STR(type) \
#define ASN_EXPR_TYPE2STR(type) _asn_expr_type2str(type)
( \
(((ssize_t)(type)) < 0 \
static
char
*
__attribute__
((
unused
))
|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \
_asn_expr_type2str
(
size_t
type
)
{
/ sizeof(asn1p_expr_type2str[0])) \
assert
((
ssize_t
)
type
>=
0
);
? (char *)0 \
if
(
type
<
sizeof
(
asn1p_expr_type2str
)
/
sizeof
(
asn1p_expr_type2str
[
0
]))
: asn1p_expr_type2str[(int)(type)] \
return
asn1p_expr_type2str
[
type
];
)
return
NULL
;
}
#endif
/* ASN1_PARSER_EXPR_STR_H */
#endif
/* ASN1_PARSER_EXPR_STR_H */
libasn1parser/expr-h.pl
View file @
04abdb24
...
@@ -9,6 +9,8 @@ print<<EOM;
...
@@ -9,6 +9,8 @@ print<<EOM;
#ifndef ASN1_PARSER_EXPR_STR_H
#ifndef ASN1_PARSER_EXPR_STR_H
#define ASN1_PARSER_EXPR_STR_H
#define ASN1_PARSER_EXPR_STR_H
#include <assert.h>
#ifndef __GNUC__
#ifndef __GNUC__
#define __attribute__(x) /* unused */
#define __attribute__(x) /* unused */
#endif
#endif
...
@@ -40,14 +42,15 @@ print<<EOM;
...
@@ -40,14 +42,15 @@ print<<EOM;
/*
/*
* Convert the ASN.1 expression type back into the string representation.
* Convert the ASN.1 expression type back into the string representation.
*/
*/
#define ASN_EXPR_TYPE2STR(type) \\
#define ASN_EXPR_TYPE2STR(type) _asn_expr_type2str(type)
( \\
(((ssize_t)(type)) < 0 \\
static char * __attribute__((unused))
|| ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \\
_asn_expr_type2str(size_t type) {
/ sizeof(asn1p_expr_type2str[0])) \\
assert((ssize_t)type >= 0);
? (char *)0 \\
if(type < sizeof(asn1p_expr_type2str)/sizeof(asn1p_expr_type2str[0]))
: asn1p_expr_type2str[(int)(type)] \\
return asn1p_expr_type2str[type];
)
return NULL;
}
#endif /* ASN1_PARSER_EXPR_STR_H */
#endif /* ASN1_PARSER_EXPR_STR_H */
EOM
EOM
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