mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Change unused vars to standard void syntax. No functional change intended.
This commit is contained in:
parent
89cfa0737f
commit
c30b9d04a8
@ -20,9 +20,6 @@ double sc_time_stamp() { return 0; }
|
|||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
// This is a more complicated example, please also see the simpler examples/make_hello_c.
|
// 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
|
// Create logs/ directory in case we have traces to put under it
|
||||||
Verilated::mkdir("logs");
|
Verilated::mkdir("logs");
|
||||||
|
|
||||||
|
@ -29,9 +29,6 @@ using namespace sc_dt;
|
|||||||
int sc_main(int argc, char* argv[]) {
|
int sc_main(int argc, char* argv[]) {
|
||||||
// This is a more complicated example, please also see the simpler examples/make_hello_c.
|
// 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
|
// Create logs/ directory in case we have traces to put under it
|
||||||
Verilated::mkdir("logs");
|
Verilated::mkdir("logs");
|
||||||
|
|
||||||
|
@ -361,7 +361,8 @@ private:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool readContentsFilter(const string& filename, StrList& outl) {
|
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
|
#ifdef INFILTER_PIPE
|
||||||
writeFilter("read \"" + filename + "\"\n");
|
writeFilter("read \"" + filename + "\"\n");
|
||||||
const string line = readFilterLine();
|
const string line = readFilterLine();
|
||||||
@ -484,7 +485,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void startFilter(const string& command) {
|
void startFilter(const string& command) {
|
||||||
if (command == "") {} // Prevent Unused
|
(void)command; // Prevent Unused variable warning
|
||||||
#ifdef INFILTER_PIPE
|
#ifdef INFILTER_PIPE
|
||||||
int fd_stdin[2]; // Can't use std::array
|
int fd_stdin[2]; // Can't use std::array
|
||||||
int fd_stdout[2]; // Can't use std::array
|
int fd_stdout[2]; // Can't use std::array
|
||||||
|
@ -51,11 +51,10 @@ void VlcTop::readCoverage(const string& filename, bool nonfatal) {
|
|||||||
if (line[secspace] == '\'' && line[secspace + 1] == ' ') break;
|
if (line[secspace] == '\'' && line[secspace + 1] == ' ') break;
|
||||||
}
|
}
|
||||||
const string point = line.substr(3, secspace - 3);
|
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);
|
// UINFO(9," point '"<<point<<"'"<<" "<<hits<<endl);
|
||||||
|
|
||||||
uint64_t pointnum = points().findAddPoint(point, hits);
|
const uint64_t pointnum = points().findAddPoint(point, hits);
|
||||||
if (pointnum) {} // Prevent unused
|
|
||||||
if (opt.rank()) { // Only if ranking - uses a lot of memory
|
if (opt.rank()) { // Only if ranking - uses a lot of memory
|
||||||
if (hits >= VlcBuckets::sufficient()) {
|
if (hits >= VlcBuckets::sufficient()) {
|
||||||
points().pointNumber(pointnum).testsCoveringInc();
|
points().pointNumber(pointnum).testsCoveringInc();
|
||||||
|
@ -1883,7 +1883,7 @@ sub _make_main {
|
|||||||
print $fh " srand48(5);\n"; # Ensure determinism
|
print $fh " srand48(5);\n"; # Ensure determinism
|
||||||
print $fh " contextp->randReset(" . $self->{verilated_randReset} . ");\n"
|
print $fh " contextp->randReset(" . $self->{verilated_randReset} . ");\n"
|
||||||
if defined $self->{verilated_randReset};
|
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};
|
print $fh " contextp->internalsDump()\n;" if $self->{verilated_debug};
|
||||||
|
|
||||||
my $set;
|
my $set;
|
||||||
|
Loading…
Reference in New Issue
Block a user