quiet some new warnings

end.c:177:16: warning: unused parameter 'why' [-Wunused-parameter]
  177 | NH_abort(char *why)
      |          ~~~~~~^~~
end.c: At top level:
end.c:1191:1: warning: 'get_saved_pline' defined but not used [-Wunused-function]
 1191 | get_saved_pline(int lineno){
      | ^~~~~~~~~~~~~~~
options.c:1263:1: warning: 'optfn_crash_urlmax' defined but not used [-Wunused-function]
 1263 | optfn_crash_urlmax(int optidx UNUSED, int req, boolean negated UNUSED, char *opts, char *op)
      | ^~~~~~~~~~~~~~~~~~
options.c:1240:1: warning: 'optfn_crash_name' defined but not used [-Wunused-function]
 1240 | optfn_crash_name(int optidx UNUSED, int req, boolean negated UNUSED, char *opts, char *op)
      | ^~~~~~~~~~~~~~~~
options.c:1217:1: warning: 'optfn_crash_email' defined but not used [-Wunused-function]
 1217 | optfn_crash_email(int optidx UNUSED, int req, boolean negated UNUSED, char *opts, char *op)
      | ^~~~~~~~~~~~~~~~~
This commit is contained in:
nhmall
2024-02-15 21:25:22 -05:00
parent 9b238bba09
commit 48c01b4ac1
2 changed files with 12 additions and 2 deletions

View File

@@ -173,8 +173,14 @@ panictrace_setsignals(boolean set)
}
#endif /* NO_SIGNAL */
#ifdef CRASHREPORT
#define USED_FOR_CRASHREPORT
#else
#define USED_FOR_CRASHREPORT UNUSED
#endif
static void
NH_abort(char *why)
NH_abort(char *why USED_FOR_CRASHREPORT)
{
int gdb_prio = SYSOPT_PANICTRACE_GDB;
int libc_prio = SYSOPT_PANICTRACE_LIBC;
@@ -1185,6 +1191,7 @@ dump_plines(void)
}
}
#ifdef CRASHREPORT
// lineno==0 gives the most recent message (e.g. "Do you want to call panic..."
// if called from #panic)
static const char *
@@ -1205,7 +1212,8 @@ get_saved_pline(int lineno){
}
return NULL;
}
#endif
#endif /* CRASHREPORT */
#endif /* DUMPLOG */
/*ARGSUSED*/
static void

View File

@@ -1213,6 +1213,7 @@ optfn_catname(
return petname_optfn(optidx, req, negated, opts, op);
}
#ifdef CRASHREPORT
static int
optfn_crash_email(int optidx UNUSED, int req, boolean negated UNUSED, char *opts, char *op)
{
@@ -1286,6 +1287,7 @@ optfn_crash_urlmax(int optidx UNUSED, int req, boolean negated UNUSED, char *opt
}
return optn_ok;
}
#endif /* CRASHREPORT */
#ifdef CURSES_GRAPHICS
static int