Change unused vars to standard void syntax. No functional change intended.

This commit is contained in:
Wilson Snyder 2024-01-20 08:57:22 -05:00
parent 89cfa0737f
commit c30b9d04a8
5 changed files with 6 additions and 12 deletions

View File

@ -20,9 +20,6 @@ double sc_time_stamp() { return 0; }
int main(int argc, char** argv) {
// This is a more complicated example, please also see the simpler examples/make_hello_c.
// Prevent unused variable warnings
if (false && argc && argv) {}
// Create logs/ directory in case we have traces to put under it
Verilated::mkdir("logs");

View File

@ -29,9 +29,6 @@ using namespace sc_dt;
int sc_main(int argc, char* argv[]) {
// This is a more complicated example, please also see the simpler examples/make_hello_c.
// Prevent unused variable warnings
if (false && argc && argv) {}
// Create logs/ directory in case we have traces to put under it
Verilated::mkdir("logs");

View File

@ -361,7 +361,8 @@ private:
return true;
}
bool readContentsFilter(const string& filename, StrList& outl) {
if (filename != "" || outl.empty()) {} // Prevent unused
(void)filename; // Prevent unused variable warning
(void)outl; // Prevent unused variable warning
#ifdef INFILTER_PIPE
writeFilter("read \"" + filename + "\"\n");
const string line = readFilterLine();
@ -484,7 +485,7 @@ private:
}
}
void startFilter(const string& command) {
if (command == "") {} // Prevent Unused
(void)command; // Prevent Unused variable warning
#ifdef INFILTER_PIPE
int fd_stdin[2]; // Can't use std::array
int fd_stdout[2]; // Can't use std::array

View File

@ -51,11 +51,10 @@ void VlcTop::readCoverage(const string& filename, bool nonfatal) {
if (line[secspace] == '\'' && line[secspace + 1] == ' ') break;
}
const string point = line.substr(3, secspace - 3);
uint64_t hits = std::atoll(line.c_str() + secspace + 1);
const uint64_t hits = std::atoll(line.c_str() + secspace + 1);
// UINFO(9," point '"<<point<<"'"<<" "<<hits<<endl);
uint64_t pointnum = points().findAddPoint(point, hits);
if (pointnum) {} // Prevent unused
const uint64_t pointnum = points().findAddPoint(point, hits);
if (opt.rank()) { // Only if ranking - uses a lot of memory
if (hits >= VlcBuckets::sufficient()) {
points().pointNumber(pointnum).testsCoveringInc();

View File

@ -1883,7 +1883,7 @@ sub _make_main {
print $fh " srand48(5);\n"; # Ensure determinism
print $fh " contextp->randReset(" . $self->{verilated_randReset} . ");\n"
if defined $self->{verilated_randReset};
print $fh " topp.reset(new ${vm_prefix}(\"top\"));\n";
print $fh " topp.reset(new ${vm_prefix}{\"top\"});\n";
print $fh " contextp->internalsDump()\n;" if $self->{verilated_debug};
my $set;