diff options
author | Andrew Waterman <andrew@sifive.com> | 2022-09-22 17:28:53 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2022-10-04 15:40:01 -0700 |
commit | a51e44ed228e48fc1dbf24ec7dc23cbd61a7874a (patch) | |
tree | 879d6e7b7a4c252ce33ca342f29ff4d436bc9d3d /spike_main/xspike.cc | |
parent | d4747aaab21ac1df31dbc40fddc2b0ae9f0221a5 (diff) | |
download | spike-a51e44ed228e48fc1dbf24ec7dc23cbd61a7874a.zip spike-a51e44ed228e48fc1dbf24ec7dc23cbd61a7874a.tar.gz spike-a51e44ed228e48fc1dbf24ec7dc23cbd61a7874a.tar.bz2 |
Fix or work around other unused-parameter warnings in ancillary programs
Diffstat (limited to 'spike_main/xspike.cc')
-rw-r--r-- | spike_main/xspike.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spike_main/xspike.cc b/spike_main/xspike.cc index f8c8ca7..661a206 100644 --- a/spike_main/xspike.cc +++ b/spike_main/xspike.cc @@ -3,6 +3,7 @@ // xspike forks an xterm for spike's target machine console, // preserving the current terminal for debugging. +#include "common.h" #include <unistd.h> #include <fcntl.h> #include <signal.h> @@ -12,10 +13,10 @@ #include <cstring> #include <stdexcept> -static pid_t fork_spike(int tty_fd, int argc, char** argv); +static pid_t fork_spike(int tty_fd, char** argv); static pid_t fork_xterm(int* tty_fd); -int main(int argc, char** argv) +int main(int UNUSED argc, char** argv) { int tty_fd, wait_status, ret = -1; pid_t xterm, spike; @@ -31,7 +32,7 @@ int main(int argc, char** argv) signal(SIGINT, handle_signal); - if ((spike = fork_spike(tty_fd, argc, argv)) < 0) + if ((spike = fork_spike(tty_fd, argv)) < 0) { fprintf(stderr, "could not open spike\n"); goto close_xterm; @@ -52,7 +53,7 @@ out: return ret; } -static pid_t fork_spike(int tty_fd, int argc, char** argv) +static pid_t fork_spike(int tty_fd, char** argv) { pid_t pid = fork(); if (pid < 0) |