mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-20 03:47:15 -04:00
ibex_pcounts: resolve uninitialize warning
Although the current code isn't wrong as far as I can tell, it would be better to initialize the lognest_name_length variable when it is declared to avoid a build warning with older Verilator versions.
This commit is contained in:
parent
667fd20d2e
commit
88d27a0944
1 changed files with 1 additions and 2 deletions
|
@ -53,10 +53,9 @@ static bool has_hpm_counter(int index) {
|
|||
|
||||
std::string ibex_pcount_string(bool csv) {
|
||||
char separator = csv ? ',' : ':';
|
||||
std::string::size_type longest_name_length;
|
||||
std::string::size_type longest_name_length = 0;
|
||||
|
||||
if (!csv) {
|
||||
longest_name_length = 0;
|
||||
for (int i = 0; i < ibex_counter_names.size(); ++i) {
|
||||
if (has_hpm_counter(i)) {
|
||||
longest_name_length =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue