1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Remove stub functions that are no longer needed.

This is the start of the payoff for all that reorganisation (and
perhaps also from having moved to a library-based build structure in
the first place): a collection of pointless stub functions in outlying
programs, which were only there to prevent link failures, now no
longer need to be there even for that purpose.
This commit is contained in:
Simon Tatham 2021-04-17 17:11:19 +01:00
parent cc3e4992d5
commit 5bb24a7edd
6 changed files with 0 additions and 55 deletions

View File

@ -6,9 +6,6 @@
#include "dialog.h"
#include "terminal.h"
/* For Unix in particular, but harmless if this main() is reused elsewhere */
const bool buildinfo_gtk_relevant = false;
static const TermWinVtable fuzz_termwin_vt;
int main(int argc, char **argv)

View File

@ -49,13 +49,6 @@ static NORETURN PRINTF_LIKE(1, 2) void fatal_error(const char *p, ...)
void out_of_memory(void) { fatal_error("out of memory"); }
/* For platforms where getticks is defined within this code base */
unsigned long (getticks)(void)
{ unreachable("this is a stub needed to link, and should never be called"); }
FILE *f_open(const struct Filename *fn, char const *mode, bool private)
{ unreachable("f_open should never be called by this test program"); }
static bool old_keyfile_warning_given;
void old_keyfile_warning(void) { old_keyfile_warning_given = true; }

View File

@ -93,13 +93,6 @@ static NORETURN PRINTF_LIKE(1, 2) void fatal_error(const char *p, ...)
}
void out_of_memory(void) { fatal_error("out of memory"); }
FILE *f_open(const Filename *filename, char const *mode, bool is_private)
{ unreachable("this is a stub needed to link, and should never be called"); }
void old_keyfile_warning(void)
{ unreachable("this is a stub needed to link, and should never be called"); }
/* For platforms where getticks is defined within this code base */
unsigned long (getticks)(void)
{ unreachable("this is a stub needed to link, and should never be called"); }
/*
* A simple deterministic PRNG, without any of the Fortuna

View File

@ -238,37 +238,6 @@ const char *const appname = "Pageant";
static bool time_to_die = false;
/* Stub functions to permit linking against x11fwd.c. These never get
* used, because in LIFE_X11 mode we connect to the X server using a
* straightforward Socket and don't try to create an ersatz SSH
* forwarding too. */
void chan_remotely_opened_confirmation(Channel *chan) { }
void chan_remotely_opened_failure(Channel *chan, const char *err) { }
bool chan_default_want_close(Channel *chan, bool s, bool r) { return false; }
bool chan_no_exit_status(Channel *ch, int s) { return false; }
bool chan_no_exit_signal(Channel *ch, ptrlen s, bool c, ptrlen m)
{ return false; }
bool chan_no_exit_signal_numeric(Channel *ch, int s, bool c, ptrlen m)
{ return false; }
bool chan_no_run_shell(Channel *chan) { return false; }
bool chan_no_run_command(Channel *chan, ptrlen command) { return false; }
bool chan_no_run_subsystem(Channel *chan, ptrlen subsys) { return false; }
bool chan_no_enable_x11_forwarding(
Channel *chan, bool oneshot, ptrlen authproto, ptrlen authdata,
unsigned screen_number) { return false; }
bool chan_no_enable_agent_forwarding(Channel *chan) { return false; }
bool chan_no_allocate_pty(
Channel *chan, ptrlen termtype, unsigned width, unsigned height,
unsigned pixwidth, unsigned pixheight, struct ssh_ttymodes modes)
{ return false; }
bool chan_no_set_env(Channel *chan, ptrlen var, ptrlen value) { return false; }
bool chan_no_send_break(Channel *chan, unsigned length) { return false; }
bool chan_no_send_signal(Channel *chan, ptrlen signame) { return false; }
bool chan_no_change_window_size(
Channel *chan, unsigned width, unsigned height,
unsigned pixwidth, unsigned pixheight) { return false; }
void chan_no_request_response(Channel *chan, bool success) {}
/*
* These functions are part of the plug for our connection to the X
* display, so they do get called. They needn't actually do anything,

View File

@ -15,8 +15,6 @@
#include "ssh.h"
#include "psocks.h"
const bool buildinfo_gtk_relevant = false;
typedef struct PsocksDataSinkPopen {
stdio_sink sink[2];
PsocksDataSink pds;

View File

@ -1331,11 +1331,6 @@ void spawn_cmd(const char *cmdline, const char *args, int show)
}
}
void logevent(LogContext *logctx, const char *event)
{
unreachable("Pageant can't create a LogContext, so this can't be called");
}
void noise_ultralight(NoiseSourceId id, unsigned long data)
{
/* Pageant doesn't use random numbers, so we ignore this */