mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-29 20:59:03 +00:00
Remove .c_str() calls from parameters to log_warning()/log_warning_noprefix()
This commit is contained in:
parent
d1fd6de6da
commit
a7c46f7b4a
25 changed files with 54 additions and 54 deletions
|
@ -974,7 +974,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
|||
message += stringf("%s%s", first_element ? " See " : ", ", place);
|
||||
first_element = false;
|
||||
}
|
||||
log_warning("%s\n", message.c_str());
|
||||
log_warning("%s\n", message);
|
||||
}
|
||||
|
||||
silent_activate:
|
||||
|
@ -1144,7 +1144,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
|||
i--; // Adjust index since we removed an element
|
||||
} else {
|
||||
// If we can't find the package, just remove the import node to avoid errors later
|
||||
log_warning("Package `%s' not found for import, removing import statement\n", child->str.c_str());
|
||||
log_warning("Package `%s' not found for import, removing import statement\n", child->str);
|
||||
children.erase(children.begin() + i);
|
||||
i--; // Adjust index since we removed an element
|
||||
}
|
||||
|
@ -1438,7 +1438,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
|||
if ((type == AST_ASSIGN_LE || type == AST_ASSIGN_EQ) && children[0]->id2ast->is_logic)
|
||||
children[0]->id2ast->is_reg = true; // if logic type is used in a block asignment
|
||||
if ((type == AST_ASSIGN_LE || type == AST_ASSIGN_EQ) && !children[0]->id2ast->is_reg)
|
||||
log_warning("wire '%s' is assigned in a block at %s.\n", children[0]->str.c_str(), loc_string().c_str());
|
||||
log_warning("wire '%s' is assigned in a block at %s.\n", children[0]->str, loc_string());
|
||||
if (type == AST_ASSIGN && children[0]->id2ast->is_reg) {
|
||||
bool is_rand_reg = false;
|
||||
if (children[1]->type == AST_FCALL) {
|
||||
|
@ -1452,7 +1452,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
|||
is_rand_reg = true;
|
||||
}
|
||||
if (!is_rand_reg)
|
||||
log_warning("reg '%s' is assigned in a continuous assignment at %s.\n", children[0]->str.c_str(), loc_string().c_str());
|
||||
log_warning("reg '%s' is assigned in a continuous assignment at %s.\n", children[0]->str, loc_string());
|
||||
}
|
||||
children[0]->was_checked = true;
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefil
|
|||
#endif
|
||||
} else {
|
||||
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
|
||||
log_warning_noprefix("%s%s\n", message_prefix.c_str(), message.c_str());
|
||||
log_warning_noprefix("%s%s\n", message_prefix, message);
|
||||
else
|
||||
log("%s%s\n", message_prefix, message);
|
||||
}
|
||||
|
@ -4098,7 +4098,7 @@ struct VerificPass : public Pass {
|
|||
unsigned new_insertion = parameters.Insert(key.c_str(), value.c_str(),
|
||||
1 /* force_overwrite */);
|
||||
if (!new_insertion)
|
||||
log_warning_noprefix("-chparam %s already specified: overwriting.\n", key.c_str());
|
||||
log_warning_noprefix("-chparam %s already specified: overwriting.\n", key);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-V") {
|
||||
|
|
|
@ -1025,7 +1025,7 @@ struct VerificSvaImporter
|
|||
{
|
||||
if (!importer->mode_keep)
|
||||
log_error("%s", errmsg);
|
||||
log_warning("%s", errmsg.c_str());
|
||||
log_warning("%s", errmsg);
|
||||
throw ParserErrorException();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue