Commit abf68896 authored by Lev Walkin's avatar Lev Walkin

removed C99izm

parent 426b0980
...@@ -246,10 +246,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx, ...@@ -246,10 +246,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
?(ssize_t)size:sel->left); ?(ssize_t)size:sel->left);
ASN_DEBUG("%p, s->l=%d, s->wn=%d, s->g=%d\n", sel, ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", sel,
sel?sel->left:0, (long)sel?sel->left:0,
sel?sel->want_nulls:0, (long)sel?sel->want_nulls:0,
sel?sel->got:0 (long)sel?sel->got:0
); );
if(sel && sel->left <= 0 && sel->want_nulls == 0) { if(sel && sel->left <= 0 && sel->want_nulls == 0) {
if(sel->prev) { if(sel->prev) {
...@@ -271,9 +271,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx, ...@@ -271,9 +271,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
} }
tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag); tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag);
ASN_DEBUG("fetch tag(size=%d,L=%d), %sstack, left=%d, wn=%d, tl=%d", ASN_DEBUG("fetch tag(size=%ld,L=%ld), %sstack, left=%ld, wn=%ld, tl=%ld",
(int)size, Left, sel?"":"!", (long)size, (long)Left, sel?"":"!",
sel?sel->left:0, sel?sel->want_nulls:0, tl); (long)sel?sel->left:0, (long)sel?sel->want_nulls:0,
(long)tl);
switch(tl) { switch(tl) {
case -1: RETURN(RC_FAIL); case -1: RETURN(RC_FAIL);
case 0: RETURN(RC_WMORE); case 0: RETURN(RC_WMORE);
...@@ -392,8 +393,9 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx, ...@@ -392,8 +393,9 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
sel->got += tlvl; sel->got += tlvl;
ADVANCE(tlvl); ADVANCE(tlvl);
ASN_DEBUG("+EXPECT2 got=%d left=%d, wn=%d, clvl=%d", ASN_DEBUG("+EXPECT2 got=%ld left=%ld, wn=%d, clvl=%d",
sel->got, sel->left, sel->want_nulls, sel->cont_level); (long)sel->got, (long)sel->left,
sel->want_nulls, sel->cont_level);
} while(tlv_constr); } while(tlv_constr);
if(sel == NULL) { if(sel == NULL) {
...@@ -495,10 +497,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx, ...@@ -495,10 +497,10 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
st->buf[st->size-1] &= 0xff << st->bits_unused; st->buf[st->size-1] &= 0xff << st->bits_unused;
} }
ASN_DEBUG("Took %d bytes to encode %s: [%s]:%d", ASN_DEBUG("Took %ld bytes to encode %s: [%s]:%ld",
consumed_myself, td->name, (long)consumed_myself, td->name,
(type_variant == _TT_GENERIC) ? (char *)st->buf : "<data>", (type_variant == _TT_GENERIC) ? (char *)st->buf : "<data>",
st->size); (long)st->size);
RETURN(RC_OK); RETURN(RC_OK);
......
...@@ -603,10 +603,11 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, ...@@ -603,10 +603,11 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
*/ */
if(ctx->phase == 2) { if(ctx->phase == 2) {
asn_dec_rval_t tmprval; asn_dec_rval_t tmprval;
elm = &td->elements[edx];
void *memb_ptr; /* Pointer to the member */ void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */ void **memb_ptr2; /* Pointer to that pointer */
elm = &td->elements[edx];
if(elm->flags & ATF_POINTER) { if(elm->flags & ATF_POINTER) {
/* Member is a pointer to another structure */ /* Member is a pointer to another structure */
memb_ptr2 = (void **)((char *)st memb_ptr2 = (void **)((char *)st
......
...@@ -652,10 +652,11 @@ SEQUENCE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, ...@@ -652,10 +652,11 @@ SEQUENCE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
*/ */
if(ctx->phase == 2) { if(ctx->phase == 2) {
asn_dec_rval_t tmprval; asn_dec_rval_t tmprval;
elm = &td->elements[edx];
void *memb_ptr; /* Pointer to the member */ void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */ void **memb_ptr2; /* Pointer to that pointer */
elm = &td->elements[edx];
if(elm->flags & ATF_POINTER) { if(elm->flags & ATF_POINTER) {
/* Member is a pointer to another structure */ /* Member is a pointer to another structure */
memb_ptr2 = (void **)((char *)st memb_ptr2 = (void **)((char *)st
......
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