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

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented May 12, 2019


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

@veripoolbot veripoolbot commented May 12, 2019


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

@veripoolbot veripoolbot commented May 12, 2019


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

@veripoolbot veripoolbot commented Jun 16, 2019


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


In 4.016.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.