1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

On some systems (NetBSD 1.6 and Solaris 9, at least), GCC doesn't understand

the semantics of assert(0) and believes it can return.  Add a gratuitous
exit(1) to convince it that this won't happen, and hence quell a couple of
warnings about variables' being used uninitialised.

[originally from svn r5669]
This commit is contained in:
Ben Harris 2005-04-24 14:43:00 +00:00
parent f2b0335c48
commit 38b266727a
2 changed files with 3 additions and 0 deletions

View File

@ -766,6 +766,7 @@ int openssh_write(const Filename *filename, struct ssh2_userkey *key,
footer = "-----END DSA PRIVATE KEY-----\n";
} else {
assert(0); /* zoinks! */
exit(1); /* XXX: GCC doesn't understand assert() on some systems. */
}
/*
@ -1497,6 +1498,7 @@ int sshcom_write(const Filename *filename, struct ssh2_userkey *key,
type = "dl-modp{sign{dsa-nist-sha1},dh{plain}}";
} else {
assert(0); /* zoinks! */
exit(1); /* XXX: GCC doesn't understand assert() on some systems. */
}
/*

View File

@ -576,6 +576,7 @@ static int try_connect(Actual_Socket sock)
default:
assert(0 && "unknown address family");
exit(1); /* XXX: GCC doesn't understand assert() on some systems. */
}
fl = fcntl(s, F_GETFL);