Commit 84fbd721 authored by Lev Walkin's avatar Lev Walkin

fixes for gcc 4.x

parent afa35b42
...@@ -708,10 +708,10 @@ decode_tlv_from_string(const char *datastring) { ...@@ -708,10 +708,10 @@ decode_tlv_from_string(const char *datastring) {
/* /*
* Dummy functions. * Dummy functions.
*/ */
asn_dec_rval_t ber_check_tags(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_struct_ctx_t *opt_ctx, const void *ptr, size_t size, int tag_mode, int last_tag_form, ber_tlv_len_t *last_length, int *opt_tlv_form) { asn_dec_rval_t rv; (void)opt_codec_ctx; (void)td; (void)opt_ctx; (void)ptr; (void)size; (void)tag_mode; (void)last_tag_form; (void)last_length; (void)opt_tlv_form; return rv; } asn_dec_rval_t ber_check_tags(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_struct_ctx_t *opt_ctx, const void *ptr, size_t size, int tag_mode, int last_tag_form, ber_tlv_len_t *last_length, int *opt_tlv_form) { asn_dec_rval_t rv = { 0, 0 }; (void)opt_codec_ctx; (void)td; (void)opt_ctx; (void)ptr; (void)size; (void)tag_mode; (void)last_tag_form; (void)last_length; (void)opt_tlv_form; return rv; }
ssize_t der_write_tags(asn_TYPE_descriptor_t *td, size_t slen, int tag_mode, int last_tag_form, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { (void)td; (void)slen; (void)tag_mode; (void)last_tag_form; (void)tag; (void)cb; (void)app_key; return -1; } ssize_t der_write_tags(asn_TYPE_descriptor_t *td, size_t slen, int tag_mode, int last_tag_form, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { (void)td; (void)slen; (void)tag_mode; (void)last_tag_form; (void)tag; (void)cb; (void)app_key; return -1; }
asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, asn_struct_ctx_t *ctx, void *struct_key, const char *xml_tag, const void *buf_ptr, size_t size, int (*otd)(void *struct_key, const void *chunk_buf, size_t chunk_size), ssize_t (*br)(void *struct_key, const void *chunk_buf, size_t chunk_size, int have_more)) { asn_dec_rval_t rv; (void)opt_codec_ctx; (void)ctx; (void)struct_key; (void)xml_tag; (void)buf_ptr; (void)size; (void)otd; (void)br; return rv; } asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, asn_struct_ctx_t *ctx, void *struct_key, const char *xml_tag, const void *buf_ptr, size_t size, int (*otd)(void *struct_key, const void *chunk_buf, size_t chunk_size), ssize_t (*br)(void *struct_key, const void *chunk_buf, size_t chunk_size, int have_more)) { asn_dec_rval_t rv = { 0, 0 }; (void)opt_codec_ctx; (void)ctx; (void)struct_key; (void)xml_tag; (void)buf_ptr; (void)size; (void)otd; (void)br; return rv; }
int xer_is_whitespace(const void *b, size_t s) { (void)b; (void)s; return 0; } int xer_is_whitespace(const void *b, size_t s) { (void)b; (void)s; return 0; }
...@@ -13,7 +13,7 @@ asn1f_fix_cstring(arg_t *arg) { ...@@ -13,7 +13,7 @@ asn1f_fix_cstring(arg_t *arg) {
if(expr->value && expr->value->type == ATV_STRING) { if(expr->value && expr->value->type == ATV_STRING) {
struct _cstring_pattern cp; struct _cstring_pattern cp;
char *buf = expr->value->value.string.buf; char *buf = (char *)expr->value->value.string.buf;
int buflen = expr->value->value.string.size; int buflen = expr->value->value.string.size;
int start = 0; int start = 0;
......
...@@ -80,7 +80,7 @@ asn1f_printable_value(asn1p_value_t *v) { ...@@ -80,7 +80,7 @@ asn1f_printable_value(asn1p_value_t *v) {
case ATV_UNPARSED: case ATV_UNPARSED:
/* Buffer is guaranteed to be null-terminated */ /* Buffer is guaranteed to be null-terminated */
assert(v->value.string.buf[v->value.string.size] == '\0'); assert(v->value.string.buf[v->value.string.size] == '\0');
return v->value.string.buf; return (char *)v->value.string.buf;
case ATV_BITVECTOR: case ATV_BITVECTOR:
{ {
uint8_t *bitvector; uint8_t *bitvector;
......
...@@ -76,7 +76,7 @@ asn1p_value_frombuf(char *buffer, int size, int do_copy) { ...@@ -76,7 +76,7 @@ asn1p_value_frombuf(char *buffer, int size, int do_copy) {
} }
v->value.string.buf = p; v->value.string.buf = p;
} else { } else {
v->value.string.buf = buffer; v->value.string.buf = (uint8_t *)buffer;
} }
v->value.string.size = size; v->value.string.size = size;
v->type = ATV_STRING; v->type = ATV_STRING;
...@@ -129,12 +129,12 @@ asn1p_value_clone(asn1p_value_t *v) { ...@@ -129,12 +129,12 @@ asn1p_value_clone(asn1p_value_t *v) {
if(clone) clone->type = v->type; if(clone) clone->type = v->type;
return clone; return clone;
case ATV_STRING: case ATV_STRING:
clone = asn1p_value_frombuf(v->value.string.buf, clone = asn1p_value_frombuf((char *)v->value.string.buf,
v->value.string.size, 1); v->value.string.size, 1);
if(clone) clone->type = v->type; if(clone) clone->type = v->type;
return clone; return clone;
case ATV_UNPARSED: case ATV_UNPARSED:
clone = asn1p_value_frombuf(v->value.string.buf, clone = asn1p_value_frombuf((char *)v->value.string.buf,
v->value.string.size, 1); v->value.string.size, 1);
if(clone) clone->type = ATV_UNPARSED; if(clone) clone->type = ATV_UNPARSED;
return clone; return clone;
......
...@@ -210,7 +210,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) { ...@@ -210,7 +210,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) {
return 0; return 0;
case ATV_STRING: case ATV_STRING:
{ {
char *p = val->value.string.buf; char *p = (char *)val->value.string.buf;
putchar('"'); putchar('"');
if(strchr(p, '"')) { if(strchr(p, '"')) {
/* Mask quotes */ /* Mask quotes */
...@@ -226,7 +226,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) { ...@@ -226,7 +226,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) {
} }
return 0; return 0;
case ATV_UNPARSED: case ATV_UNPARSED:
fputs(val->value.string.buf, stdout); fputs((char *)val->value.string.buf, stdout);
return 0; return 0;
case ATV_BITVECTOR: case ATV_BITVECTOR:
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment