From 3fbc583fdafb8e1bcd61b921e74e6142919b56b8 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Mon, 8 Jul 2024 15:20:22 +0300 Subject: [PATCH] Show warning instead of error if device property not exists --- src/check_netlist.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/check_netlist.cpp b/src/check_netlist.cpp index 5c173913..3e9397fc 100644 --- a/src/check_netlist.cpp +++ b/src/check_netlist.cpp @@ -1802,19 +1802,21 @@ static int checker_validate_properties (struct definition_t * root, { /* check whether properties are either required or optional */ int type = checker_is_property (available, pair->key); + bool invalid_prop = false; if (type == PROP_NONE) { if (strcmp (def->type, "Def")) { - logprint (LOG_ERROR, - "line %d: checker error, extraneous property `%s' is " + logprint (LOG_STATUS, + "line %d: checker warning, extraneous property `%s' is " "invalid in `%s:%s'\n", def->line, pair->key, def->type, def->instance); - errors++; + // errors++; + invalid_prop = true; } } - // do not check zero-length lists - if (pair->value != NULL) + // do not check zero-length lists and non-exisiting properties + if (pair->value != NULL && !invalid_prop) { /* check and evaluate the unit scale in a property */ if (!checker_evaluate_scale (pair->value))