fixes for gcc 4.x

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@908 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-06-15 18:41:50 +00:00
parent d0137e1e17
commit 55289c1ee7
5 changed files with 9 additions and 9 deletions

View File

@ -708,10 +708,10 @@ decode_tlv_from_string(const char *datastring) {
/*
* 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; }
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; }

View File

@ -13,7 +13,7 @@ asn1f_fix_cstring(arg_t *arg) {
if(expr->value && expr->value->type == ATV_STRING) {
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 start = 0;

View File

@ -80,7 +80,7 @@ asn1f_printable_value(asn1p_value_t *v) {
case ATV_UNPARSED:
/* Buffer is guaranteed to be null-terminated */
assert(v->value.string.buf[v->value.string.size] == '\0');
return v->value.string.buf;
return (char *)v->value.string.buf;
case ATV_BITVECTOR:
{
uint8_t *bitvector;

View File

@ -76,7 +76,7 @@ asn1p_value_frombuf(char *buffer, int size, int do_copy) {
}
v->value.string.buf = p;
} else {
v->value.string.buf = buffer;
v->value.string.buf = (uint8_t *)buffer;
}
v->value.string.size = size;
v->type = ATV_STRING;
@ -129,12 +129,12 @@ asn1p_value_clone(asn1p_value_t *v) {
if(clone) clone->type = v->type;
return clone;
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);
if(clone) clone->type = v->type;
return clone;
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);
if(clone) clone->type = ATV_UNPARSED;
return clone;

View File

@ -210,7 +210,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) {
return 0;
case ATV_STRING:
{
char *p = val->value.string.buf;
char *p = (char *)val->value.string.buf;
putchar('"');
if(strchr(p, '"')) {
/* Mask quotes */
@ -226,7 +226,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) {
}
return 0;
case ATV_UNPARSED:
fputs(val->value.string.buf, stdout);
fputs((char *)val->value.string.buf, stdout);
return 0;
case ATV_BITVECTOR:
{