avoid printing erc warnings about missing "name=" attribute in symbols if there is a definition in symbol template string

This commit is contained in:
Stefan Schippers 2020-10-15 01:43:53 +02:00
parent 8e5bfe2a13
commit acb5c45db1
1 changed files with 3 additions and 1 deletions

View File

@ -673,7 +673,9 @@ void prepare_netlist_structs(int for_netlist)
if (xctx.inst[i].ptr<0) continue;
my_strdup(248, &type,(xctx.inst[i].ptr+ xctx.sym)->type);
if(print_erc && (!xctx.inst[i].instname || !xctx.inst[i].instname[0]) ) {
if(print_erc && (!xctx.inst[i].instname || !xctx.inst[i].instname[0]) &&
!get_tok_value((xctx.inst[i].ptr+ xctx.sym)->templ, "name", 0)[0]
) {
char str[2048];
if( strcmp(type, "package") &&
strcmp(type, "port_attributes") &&