Index: abstract.c =================================================================== --- abstract.c (revision 690) +++ abstract.c (revision 691) @@ -39,6 +39,15 @@ htsp_init(&abs->nets, strhash, strkeyeq); } +/* Initialize an object by setting the common header fields; the only purpose + of this function is to get compiler warnings at every caller when the header + is extended (because the number of args would be extended here) */ +csch_inline void csch_aobj_init(csch_ahdr_t *dst, csch_atype_t type) +{ + dst->type = type; + csch_attrib_init(&dst->attr); +} + csch_anet_t *csch_anet_get(csch_abstract_t *abs, const char *netname, int alloc) { csch_anet_t *net; @@ -48,6 +57,7 @@ return net; net = calloc(sizeof(csch_anet_t), 1); + csch_aobj_init(&net->hdr, CSCH_ATYPE_NET); net->netname = csch_strdup(netname); htsp_set(&abs->nets, net->netname, net); return net;