avoid new gcc warnings for assigning the lvalue
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c
index c35588d..5034e42 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -1113,9 +1113,10 @@
*/
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;
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)",