Commit bb880872 authored by Mouse's avatar Mouse

Add zero-initializers to all occurrences of definition asn_enc_rval_t er;

parent 8d2e1294
......@@ -82,7 +82,7 @@ static int ANY__consume_bytes(const void *buffer, size_t size, void *key);
int
ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
struct _callback_arg arg;
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
if(!st || !td) {
errno = EINVAL;
......
......@@ -96,7 +96,7 @@ asn_enc_rval_t
BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0, 0, 0};
char scratch[128];
char *p = scratch;
char *scend = scratch + (sizeof(scratch) - 10);
......
......@@ -200,7 +200,7 @@ BMPString_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const BMPString_t *st = (const BMPString_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)ilevel;
(void)flags;
......
......@@ -123,7 +123,7 @@ asn_enc_rval_t
BOOLEAN_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb,
void *app_key) {
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
erval.encoded = der_write_tags(td, 1, tag_mode, 0, tag, cb, app_key);
......
......@@ -246,7 +246,7 @@ GeneralizedTime_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
GeneralizedTime_t *st;
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
int fv, fd; /* seconds fraction value and number of digits */
struct tm tm;
time_t tloc;
......
......@@ -571,7 +571,7 @@ INTEGER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const INTEGER_t *st = (const INTEGER_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)ilevel;
(void)flags;
......@@ -710,7 +710,7 @@ INTEGER_encode_uper(const asn_TYPE_descriptor_t *td,
asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const INTEGER_t *st = (const INTEGER_t *)sptr;
const uint8_t *buf;
const uint8_t *end;
......@@ -973,7 +973,7 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const INTEGER_t *st = (const INTEGER_t *)sptr;
const uint8_t *buf;
const uint8_t *end;
......
......@@ -104,7 +104,7 @@ INTEGER_encode_oer(const asn_TYPE_descriptor_t *td,
const asn_oer_constraints_t *constraints, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
const INTEGER_t *st = sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
struct asn_oer_constraint_number_s ct = {0, 0};
const uint8_t *buf;
const uint8_t *end;
......
......@@ -58,7 +58,7 @@ asn_TYPE_descriptor_t asn_DEF_NULL = {
asn_enc_rval_t
NULL_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode,
ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
erval.encoded = der_write_tags(td, 0, tag_mode, 0, tag, cb, app_key);
if(erval.encoded == -1) {
......@@ -73,7 +73,7 @@ asn_enc_rval_t
NULL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)td;
(void)sptr;
......@@ -164,7 +164,7 @@ asn_enc_rval_t
NULL_encode_oer(const asn_TYPE_descriptor_t *td,
const asn_oer_constraints_t *constraints, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)td;
(void)sptr;
......@@ -215,7 +215,7 @@ asn_enc_rval_t
NULL_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)td;
(void)constraints;
......@@ -230,7 +230,7 @@ asn_dec_rval_t
NULL_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rv;
asn_dec_rval_t rv = {RC_OK, 0};
(void)opt_codec_ctx;
(void)td;
......@@ -260,7 +260,7 @@ asn_enc_rval_t
NULL_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)td;
(void)constraints;
......
......@@ -66,7 +66,7 @@ NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const long *native = (const long *)sptr;
const asn_INTEGER_enum_map_t *el;
......@@ -163,7 +163,7 @@ NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
long native, value;
const asn_per_constraint_t *ct;
int inext = 0;
......@@ -300,7 +300,7 @@ NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
long native, value;
const asn_per_constraint_t *ct;
int inext = 0;
......
......@@ -103,7 +103,7 @@ NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td,
const asn_oer_constraints_t *constraints,
const void *sptr, asn_app_consume_bytes_f *cb,
void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
long native;
(void)constraints;
......
......@@ -155,7 +155,7 @@ NativeInteger_encode_der(const asn_TYPE_descriptor_t *sd, const void *ptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
unsigned long native = *(const unsigned long *)ptr; /* Disable sign ext. */
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
INTEGER_t tmp;
#ifdef WORDS_BIGENDIAN /* Opportunistic optimization */
......@@ -236,7 +236,7 @@ NativeInteger_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
char scratch[32]; /* Enough for 64-bit int */
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const long *native = (const long *)sptr;
(void)ilevel;
......@@ -299,7 +299,7 @@ NativeInteger_encode_uper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs =
(const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
long native;
INTEGER_t tmpint;
......@@ -361,7 +361,7 @@ NativeInteger_encode_aper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
long native;
INTEGER_t tmpint;
......
......@@ -178,7 +178,7 @@ NativeReal_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
double d = NativeReal__get_double(td, sptr);
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
REAL_t tmp;
/* Prepare a temporary clean structure */
......@@ -244,7 +244,7 @@ NativeReal_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
double d = NativeReal__get_double(td, sptr);
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
REAL_t tmp;
(void)constraints;
......@@ -310,7 +310,7 @@ NativeReal_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_per_outp_t *po) {
double Dbl = *(const double *)sptr;
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
REAL_t tmp;
(void)constraints;
......@@ -590,7 +590,7 @@ NativeReal_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
double d = NativeReal__get_double(td, sptr);
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)ilevel;
......
......@@ -243,7 +243,7 @@ OBJECT_IDENTIFIER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)ilevel;
(void)flags;
......
......@@ -539,7 +539,7 @@ asn_enc_rval_t
OCTET_STRING_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = { 0, 0, 0 };
const asn_OCTET_STRING_specifics_t *specs = td->specifics
? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_OCTET_STRING_specs;
......@@ -603,7 +603,7 @@ OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
const char * const h2c = "0123456789ABCDEF";
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = { 0, 0, 0 };
char scratch[16 * 3 + 4];
char *p = scratch;
uint8_t *buf;
......@@ -754,7 +754,7 @@ OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = { 0, 0, 0 };
uint8_t *buf, *end;
uint8_t *ss; /* Sequence start */
ssize_t encoded_len = 0;
......
......@@ -364,7 +364,7 @@ OPEN_TYPE_encode_uper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const void *memb_ptr; /* Pointer to the member */
asn_TYPE_member_t *elm; /* CHOICE's element */
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
unsigned present;
(void)constraints;
......@@ -474,7 +474,7 @@ OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const void *memb_ptr; /* Pointer to the member */
asn_TYPE_member_t *elm; /* CHOICE's element */
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
unsigned present;
(void)constraints;
......
......@@ -377,7 +377,7 @@ REAL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
void *app_key) {
const REAL_t *st = (const REAL_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
double d;
(void)ilevel;
......@@ -854,7 +854,7 @@ REAL_encode_oer(const asn_TYPE_descriptor_t *td,
const asn_oer_constraints_t *constraints, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
const REAL_t *st = sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
ssize_t len_len;
if(!st || !st->buf || !td)
......
......@@ -175,7 +175,7 @@ RELATIVE_OID_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const RELATIVE_OID_t *st = (const RELATIVE_OID_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)ilevel; /* Unused argument */
(void)flags; /* Unused argument */
......
......@@ -211,7 +211,7 @@ UniversalString_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
const UniversalString_t *st = (const UniversalString_t *)sptr;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
(void)ilevel;
(void)flags;
......
......@@ -134,7 +134,7 @@ asn_encode(const asn_codec_ctx_t *opt_codec_ctx,
enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td,
const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key) {
struct callback_failure_catch_key cb_key;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
if(!callback) {
errno = EINVAL;
......@@ -162,7 +162,7 @@ asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td, const void *sptr,
void *buffer, size_t buffer_size) {
struct overrun_encoder_key buf_key;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
if(buffer_size > 0 && !buffer) {
errno = EINVAL;
......@@ -225,7 +225,7 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
enum asn_transfer_syntax syntax,
const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *callback, void *callback_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL;
(void)opt_codec_ctx; /* Parameters are not checked on encode yet. */
......
......@@ -84,7 +84,7 @@ asn_enc_rval_t
der_encode_primitive(const asn_TYPE_descriptor_t *td, const void *sptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr;
ASN_DEBUG("%s %s as a primitive type (tm=%d)",
......
......@@ -365,7 +365,7 @@ CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
void *app_key) {
const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics;
asn_TYPE_member_t *elm; /* CHOICE element */
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
const void *memb_ptr;
size_t computed_size = 0;
unsigned present;
......@@ -781,8 +781,8 @@ CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
void *app_key) {
const asn_CHOICE_specifics_t *specs =
(const asn_CHOICE_specifics_t *)td->specifics;
asn_enc_rval_t er;
unsigned present;
asn_enc_rval_t er = {0,0,0};
unsigned present = 0;
if(!sptr)
ASN__ENCODE_FAILED;
......@@ -795,9 +795,9 @@ CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
if(present == 0 || present > td->elements_count) {
ASN__ENCODE_FAILED;
} else {
asn_enc_rval_t tmper;
asn_enc_rval_t tmper = {0,0,0};
asn_TYPE_member_t *elm = &td->elements[present-1];
const void *memb_ptr;
const void *memb_ptr = NULL;
const char *mname = elm->name;
unsigned int mlen = strlen(mname);
......@@ -997,7 +997,7 @@ CHOICE_encode_uper(const asn_TYPE_descriptor_t *td,
return elm->type->op->uper_encoder(
elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po);
} else {
asn_enc_rval_t rval;
asn_enc_rval_t rval = {0,0,0};
if(specs->ext_start == -1) ASN__ENCODE_FAILED;
if(uper_put_nsnnwn(po, present_enc - specs->ext_start))
ASN__ENCODE_FAILED;
......@@ -1163,7 +1163,7 @@ CHOICE_encode_aper(const asn_TYPE_descriptor_t *td,
return elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints,
memb_ptr, po);
} else {
asn_enc_rval_t rval;
asn_enc_rval_t rval = {0,0,0};
if(specs->ext_start == -1)
ASN__ENCODE_FAILED;
if(aper_put_nsnnwn(po, ct->range_bits, present - specs->ext_start))
......
......@@ -216,7 +216,7 @@ CHOICE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_member_t *elm = &elements[ctx->step]; /* CHOICE's element */
void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */
asn_dec_rval_t rval;
asn_dec_rval_t rval = {0,0};
/*
* Compute the position of the member inside a structure,
......
......@@ -512,7 +512,7 @@ SEQUENCE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
size_t computed_size = 0;
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
ssize_t ret;
size_t edx;
......@@ -574,7 +574,7 @@ SEQUENCE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
*/
for(edx = 0; edx < td->elements_count; edx++) {
asn_TYPE_member_t *elm = &td->elements[edx];
asn_enc_rval_t tmperval;
asn_enc_rval_t tmperval = {0,0,0};
const void *memb_ptr; /* Pointer to the member */
const void *const *memb_ptr2; /* Pointer to that pointer */
......@@ -868,7 +868,7 @@ asn_enc_rval_t
SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
int xcan = (flags & XER_F_CANONICAL);
asn_TYPE_descriptor_t *tmp_def_val_td = 0;
void *tmp_def_val = 0;
......@@ -879,7 +879,7 @@ SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
er.encoded = 0;
for(edx = 0; edx < td->elements_count; edx++) {
asn_enc_rval_t tmper;
asn_enc_rval_t tmper = {0,0,0};
asn_TYPE_member_t *elm = &td->elements[edx];
const void *memb_ptr;
const char *mname = elm->name;
......@@ -1357,7 +1357,7 @@ SEQUENCE_encode_uper(const asn_TYPE_descriptor_t *td,
asn_per_outp_t *po) {
const asn_SEQUENCE_specifics_t *specs
= (const asn_SEQUENCE_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
int n_extensions;
size_t edx;
size_t i;
......@@ -1785,7 +1785,7 @@ SEQUENCE_encode_aper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const asn_SEQUENCE_specifics_t *specs
= (const asn_SEQUENCE_specifics_t *)td->specifics;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
int n_extensions;
size_t edx;
size_t i;
......
......@@ -18,7 +18,7 @@ SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr,
const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(ptr);
size_t computed_size = 0;
ssize_t encoding_size = 0;
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
int edx;
ASN_DEBUG("Estimating size of SEQUENCE OF %s", td->name);
......@@ -91,7 +91,7 @@ asn_enc_rval_t
SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
const asn_TYPE_member_t *elm = td->elements;
const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr);
......@@ -107,7 +107,7 @@ SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
er.encoded = 0;
for(i = 0; i < list->count; i++) {
asn_enc_rval_t tmper;
asn_enc_rval_t tmper = {0,0,0};
void *memb_ptr = list->array[i];
if(!memb_ptr) continue;
......@@ -147,7 +147,7 @@ SEQUENCE_OF_encode_uper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const asn_anonymous_sequence_ *list;
const asn_per_constraint_t *ct;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const asn_TYPE_member_t *elm = td->elements;
size_t encoded_edx;
......@@ -231,7 +231,7 @@ SEQUENCE_OF_encode_aper(const asn_TYPE_descriptor_t *td,
const void *sptr, asn_per_outp_t *po) {
const asn_anonymous_sequence_ *list;
const asn_per_constraint_t *ct;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
asn_TYPE_member_t *elm = td->elements;
int seq;
......
......@@ -453,7 +453,7 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td,
*/
for(edx = 0; edx < td->elements_count; edx++) {
asn_TYPE_member_t *elm = &td->elements[edx];
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const void *memb_ptr;
if(IN_EXTENSION_GROUP(specs, edx)) break;
......
......@@ -371,7 +371,7 @@ SET_OF__encode_sorted(const asn_TYPE_member_t *elm,
for(edx = 0; edx < list->count; edx++) {
const void *memb_ptr = list->array[edx];
struct _el_buffer *encoding_el = &encoded_els[edx];
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
if(!memb_ptr) break;
......@@ -435,7 +435,7 @@ SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
*/
for(edx = 0; edx < list->count; edx++) {
void *memb_ptr = list->array[edx];
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
if(!memb_ptr) ASN__ENCODE_FAILED;
......@@ -457,7 +457,7 @@ SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
computed_size += encoding_size;
if(!cb || list->count == 0) {
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
erval.encoded = computed_size;
ASN__ENCODED_OK(erval);
}
......@@ -488,7 +488,7 @@ SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr,
SET_OF__encode_sorted_free(encoded_els, list->count);
if(edx == list->count) {
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
assert(computed_size == (size_t)encoding_size);
erval.encoded = computed_size;
ASN__ENCODED_OK(erval);
......@@ -526,7 +526,7 @@ SET_OF_decode_xer(const asn_codec_ctx_t *opt_codec_ctx,
void *st = *struct_ptr; /* Target structure. */
asn_struct_ctx_t *ctx; /* Decoder context */
asn_dec_rval_t rval; /* Return value from a decoder */
asn_dec_rval_t rval = {RC_OK, 0};/* Return value from a decoder */
ssize_t consumed_myself = 0; /* Consumed bytes from ptr */
/*
......@@ -565,7 +565,7 @@ SET_OF_decode_xer(const asn_codec_ctx_t *opt_codec_ctx,
* Go inside the inner member of a set.
*/
if(ctx->phase == 2) {
asn_dec_rval_t tmprval;
asn_dec_rval_t tmprval = {RC_OK, 0};
/* Invoke the inner type decoder, m.b. multiple times */
ASN_DEBUG("XER/SET OF element [%s]", elm_tag);
......@@ -697,7 +697,7 @@ asn_enc_rval_t
SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
void *app_key) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
const asn_TYPE_member_t *elm = td->elements;
const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr);
......@@ -722,7 +722,7 @@ SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
er.encoded = 0;
for(i = 0; i < list->count; i++) {
asn_enc_rval_t tmper;
asn_enc_rval_t tmper = {0,0,0};
void *memb_ptr = list->array[i];
if(!memb_ptr) continue;
......@@ -909,7 +909,7 @@ SET_OF_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
asn_dec_rval_t rv;
asn_dec_rval_t rv = {RC_OK, 0};
const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
const asn_TYPE_member_t *elm = td->elements; /* Single one */
void *st = *sptr;
......@@ -1007,7 +1007,7 @@ SET_OF_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraint_t *ct;
const asn_TYPE_member_t *elm = td->elements;
struct _el_buffer *encoded_els;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
size_t encoded_edx;
if(!sptr) ASN__ENCODE_FAILED;
......@@ -1101,7 +1101,7 @@ asn_dec_rval_t
SET_OF_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
asn_dec_rval_t rv;
asn_dec_rval_t rv = {RC_OK, 0};
const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics;
const asn_TYPE_member_t *elm = td->elements; /* Single one */
void *st = *sptr;
......
......@@ -264,7 +264,7 @@ SET_OF_encode_oer(const asn_TYPE_descriptor_t *td,
for(n = 0; n < list->count; n++) {
void *memb_ptr = list->array[n];
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
er = elm->type->op->oer_encoder(
elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb,
app_key);
......@@ -276,7 +276,7 @@ SET_OF_encode_oer(const asn_TYPE_descriptor_t *td,
}
{
asn_enc_rval_t erval;
asn_enc_rval_t erval = {0,0,0};
erval.encoded = computed_size;
ASN__ENCODED_OK(erval);
}
......
......@@ -442,7 +442,7 @@ main(int ac, char *av[]) {
* Process all files in turn.
*/
for(ac_i = (isyntax == ATS_RANDOM) ? -1 : 0; ac_i < ac; ac_i++) {
asn_enc_rval_t erv;
asn_enc_rval_t erv = {0,0,0};
void *structure; /* Decoded structure */
FILE *file;
char *name;
......
......@@ -121,7 +121,7 @@ oer_open_type_put(const asn_TYPE_descriptor_t *td,
const asn_oer_constraints_t *constraints, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
size_t serialized_byte_count = 0;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
ssize_t len_len;
er = td->op->oer_encoder(td, constraints, sptr, oer__count_bytes,
......
......@@ -17,7 +17,7 @@ uper_encode(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_app_consume_bytes_f *cb, void *app_key) {
asn_per_outp_t po;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
/*
* Invoke type-specific encoder.
......@@ -114,7 +114,7 @@ ssize_t
uper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, void **buffer_r) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
enc_dyn_arg key;
memset(&key, 0, sizeof(key));
......@@ -181,7 +181,7 @@ ssize_t
aper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, void **buffer_r) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
enc_dyn_arg key;
memset(&key, 0, sizeof(key));
......@@ -233,7 +233,7 @@ aper_encode(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints,
const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) {
asn_per_outp_t po;
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
/*
* Invoke type-specific encoder.
......
......@@ -53,7 +53,7 @@ xer__print2fp(const void *buffer, size_t size, void *app_key) {
int
xer_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *sptr) {
asn_enc_rval_t er;
asn_enc_rval_t er = {0,0,0};
if(!stream) stream = stdout;
if(!td || !sptr)
......
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