Commit 8484ed81 authored by Lev Walkin's avatar Lev Walkin

avoid new gcc warnings for assigning the lvalue

parent b7c45ca3
...@@ -1113,9 +1113,10 @@ OCTET_STRING__decode_xer(asn_codec_ctx_t *opt_codec_ctx, ...@@ -1113,9 +1113,10 @@ OCTET_STRING__decode_xer(asn_codec_ctx_t *opt_codec_ctx,
*/ */
if(!*sptr) { if(!*sptr) {
OCTET_STRING_t *st; OCTET_STRING_t *st;
(void *)st = *sptr = CALLOC(1, specs->struct_size); st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size);
if(st) st->buf = (uint8_t *)CALLOC(1, 1); if(st) st->buf = (uint8_t *)CALLOC(1, 1);
if(!*sptr || !st->buf) { *sptr = (void *)st;
if(!st || !st->buf) {
asn_dec_rval_t rval; asn_dec_rval_t rval;
if(*sptr) FREEMEM(*sptr); if(*sptr) FREEMEM(*sptr);
rval.code = RC_FAIL; rval.code = RC_FAIL;
......
...@@ -22,12 +22,13 @@ ber_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, ...@@ -22,12 +22,13 @@ ber_decode_primitive(asn_codec_ctx_t *opt_codec_ctx,
* If the structure is not there, allocate it. * If the structure is not there, allocate it.
*/ */
if(st == NULL) { if(st == NULL) {
(void *)st = *sptr = CALLOC(1, sizeof(*st)); st = (ASN__PRIMITIVE_TYPE_t *)CALLOC(1, sizeof(*st));
if(st == NULL) { if(st == NULL) {
rval.code = RC_FAIL; rval.code = RC_FAIL;
rval.consumed = 0; rval.consumed = 0;
return rval; return rval;
} }
*sptr = (void *)st;
} }
ASN_DEBUG("Decoding %s as plain primitive (tm=%d)", ASN_DEBUG("Decoding %s as plain primitive (tm=%d)",
......
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