about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-25 20:47:41 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-25 20:47:41 -0700
commit1a33d221c1a23c218d3457dfe2a4344c2a33f9a1 (patch)
tree1a1c36fc15a05b88564bed9215e59bcfe267aea9 /subx
parentd671148d99e35b7643068d3ea59babaf7ce336e8 (diff)
downloadmu-1a33d221c1a23c218d3457dfe2a4344c2a33f9a1.tar.gz
4413
Never mind, let's drop unused/vestigial altogether. Use absence of names
to signal unused arguments.
Diffstat (limited to 'subx')
-rw-r--r--subx/001help.cc4
-rw-r--r--subx/003trace.cc2
-rw-r--r--subx/020elf.cc4
3 files changed, 4 insertions, 6 deletions
diff --git a/subx/001help.cc b/subx/001help.cc
index 564c1211..636205ad 100644
--- a/subx/001help.cc
+++ b/subx/001help.cc
@@ -158,7 +158,7 @@ void initialize_signal_handlers() {
   sigaction(SIGABRT, &action, NULL);  // assert() failure or integer overflow on linux (with -ftrapv)
   sigaction(SIGILL,  &action, NULL);  // integer overflow on OS X (with -ftrapv)
 }
-void dump_and_exit(int sig, vestigial siginfo_t*, vestigial void*) {
+void dump_and_exit(int sig, siginfo_t* /*unused*/, void* /*unused*/) {
   switch (sig) {
     case SIGABRT:
       #ifndef __APPLE__
@@ -256,8 +256,6 @@ using std::cerr;
 #include <string>
 using std::string;
 
-#define vestigial  __attribute__((unused))
-
 #include <algorithm>
 using std::min;
 using std::max;
diff --git a/subx/003trace.cc b/subx/003trace.cc
index 120ada82..994b5eca 100644
--- a/subx/003trace.cc
+++ b/subx/003trace.cc
@@ -183,7 +183,7 @@ bool trace_contains_errors() {
 :(before "End Types")
 struct end {};
 :(code)
-ostream& operator<<(ostream& os, vestigial end) {
+ostream& operator<<(ostream& os, end /*unused*/) {
   if (Trace_stream) Trace_stream->newline();
   return os;
 }
diff --git a/subx/020elf.cc b/subx/020elf.cc
index ca7b2483..dccf889a 100644
--- a/subx/020elf.cc
+++ b/subx/020elf.cc
@@ -119,7 +119,7 @@ inline uint16_t u16_in(uint8_t* p) {
 :(before "End Types")
 struct perr {};
 :(code)
-ostream& operator<<(ostream& os, vestigial perr) {
+ostream& operator<<(ostream& os, perr /*unused*/) {
   if (errno)
     os << ": " << strerror(errno);
   return os;
@@ -128,7 +128,7 @@ ostream& operator<<(ostream& os, vestigial perr) {
 :(before "End Types")
 struct die {};
 :(code)
-ostream& operator<<(vestigial ostream&, vestigial die) {
+ostream& operator<<(ostream& /*unused*/, die /*unused*/) {
   if (Trace_stream) Trace_stream->newline();
   exit(1);
 }