mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 21:22:11 +01:00
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:
parent
2b437402e8
commit
14f4b38fb1
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user