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, main (int argc,
char *argv[]) char *argv[])
{ {
GSocket *socket; GSocket *socket = NULL;
GSocketAddress *address; GSocketAddress *address = NULL;
GError *error = NULL; GError *error = NULL;
GOptionContext *context; GOptionContext *context;
GCancellable *cancellable; GCancellable *cancellable;
GIOStream *connection; GIOStream *connection = NULL;
GInputStream *istream; GInputStream *istream = NULL;
GOutputStream *ostream; GOutputStream *ostream = NULL;
GSocketAddress *src_address = NULL; GSocketAddress *src_address = NULL;
GTlsCertificate *certificate = NULL; GTlsCertificate *certificate = NULL;
gint i; gint i;