Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1433

Warnings from unused parameters in verilated_fst_c.h

Added by Pieter Kapsenberg 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
Configure/Make/Compiling
% Done:

0%


Description

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; }

fst_time_unit.patch View (1.43 KB) Pieter Kapsenberg, 05/12/2019 04:58 AM

History

#1 Updated by Pieter Kapsenberg 2 months ago

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".

#2 Updated by Wilson Snyder 2 months ago

  • Status changed from New to Resolved
  • Assignee set to Pieter Kapsenberg

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.

#3 Updated by Wilson Snyder about 1 month ago

  • Status changed from Resolved to Closed

In 4.016.

Also available in: Atom