tests: NULL-initialise some variables to help scan-build

Dynamically, these will only ever be used after they’ve been initialised
due to correct checking of `use_udp` throughout the test. However,
that’s a global variable and the static analyser is assuming it might
change value. So help it out by NULL-initialising the variables so they
can never be used uninitialised.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-06-07 11:04:25 +01:00
parent 2b437402e8
commit 14f4b38fb1

View File

@ -249,14 +249,14 @@ int
main (int argc,
char *argv[])
{
GSocket *socket;
GSocketAddress *address;
GSocket *socket = NULL;
GSocketAddress *address = NULL;
GError *error = NULL;
GOptionContext *context;
GCancellable *cancellable;
GIOStream *connection;
GInputStream *istream;
GOutputStream *ostream;
GIOStream *connection = NULL;
GInputStream *istream = NULL;
GOutputStream *ostream = NULL;
GSocketAddress *src_address = NULL;
GTlsCertificate *certificate = NULL;
gint i;