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
diff --git a/skeletons/asn_codecs_prim.c b/skeletons/asn_codecs_prim.c
index f2d045a..03f107b 100644
--- a/skeletons/asn_codecs_prim.c
+++ b/skeletons/asn_codecs_prim.c
@@ -22,12 +22,13 @@
* 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)",