mirror of https://gerrit.osmocom.org/asn1c
avoid new gcc warnings for assigning the lvalue
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@582 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
bde35d45b9
commit
82e317b649
|
@ -1113,9 +1113,10 @@ OCTET_STRING__decode_xer(asn_codec_ctx_t *opt_codec_ctx,
|
|||
*/
|
||||
if(!*sptr) {
|
||||
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(!*sptr || !st->buf) {
|
||||
*sptr = (void *)st;
|
||||
if(!st || !st->buf) {
|
||||
asn_dec_rval_t rval;
|
||||
if(*sptr) FREEMEM(*sptr);
|
||||
rval.code = RC_FAIL;
|
||||
|
|
|
@ -22,12 +22,13 @@ ber_decode_primitive(asn_codec_ctx_t *opt_codec_ctx,
|
|||
* If the structure is not there, allocate it.
|
||||
*/
|
||||
if(st == NULL) {
|
||||
(void *)st = *sptr = CALLOC(1, sizeof(*st));
|
||||
st = (ASN__PRIMITIVE_TYPE_t *)CALLOC(1, sizeof(*st));
|
||||
if(st == NULL) {
|
||||
rval.code = RC_FAIL;
|
||||
rval.consumed = 0;
|
||||
return rval;
|
||||
}
|
||||
*sptr = (void *)st;
|
||||
}
|
||||
|
||||
ASN_DEBUG("Decoding %s as plain primitive (tm=%d)",
|
||||
|
|
Loading…
Reference in New Issue