aboutsummaryrefslogtreecommitdiff
path: root/spike_main/xspike.cc
diff options
context:
space:
mode:
Diffstat (limited to 'spike_main/xspike.cc')
-rw-r--r--spike_main/xspike.cc9
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)