Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings from unused parameters in verilated_fst_c.h #1433

Closed
veripoolbot opened this issue May 12, 2019 · 3 comments
Closed

Warnings from unused parameters in verilated_fst_c.h #1433

veripoolbot opened this issue May 12, 2019 · 3 comments
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Pieter Kapsenberg
Original Redmine Issue: 1433 from https://www.veripool.org

Original Assignee: Pieter Kapsenberg


In my current project I get some warnings from unused parameters. Since this in the FST header, it gets pulled into my code where I have -Wall and -Werror turned on.

verilator/include/verilated_fst_c.h: In member function ‘void VerilatedFstC::set_time_unit(const char*)’:
verilator/include/verilated_fst_c.h:219:36: error: unused parameter ‘unit’ [-Werror=unused-parameter]
      void set_time_unit(const char* unit) { /* TODO */ }
verilator/include/verilated_fst_c.h: In member function ‘void VerilatedFstC::set_time_resolution(const char*)’:
verilator/include/verilated_fst_c.h:223:42: error: unused parameter ‘unit’ [-Werror=unused-parameter]
      void set_time_resolution(const char* unit) { /* TODO */ }


This is pretty easy to fix with a void cast:

  void set_time_unit(const char *unit) { /* TODO */ (void)unit; }
  // ... clipped ...
  void set_time_resolution(const char *unit) { /* TODO */ (void)unit; }
</code>
@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Pieter Kapsenberg
Original Date: 2019-05-12T05:01:34Z


I have attached a patch file that adds the cast to the set_time_resolution call, and implements the
set_time_unit. It simply forwards the call to the FST writer API. It seems to work just fine, I can create picosecond FST files with "1ps".

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-05-12T12:20:11Z


Wall done. I also passed set_time_resolution call down to the VerilatedFst class which would be needed if we ever get SystemC FST tracing working.

Fixed in git towards 4.015.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-06-16T13:58:25Z


In 4.016.

@veripoolbot veripoolbot added area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant