From: Andreas Schneider Date: Fri, 10 Dec 2021 16:24:43 +0000 (+0100) Subject: s3:torture: Initialize pointer with NULL X-Git-Tag: tdb-1.4.6~347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7e1a81cc05fdffb2c377bdc480e974a70f76bef;p=thirdparty%2Fsamba.git s3:torture: Initialize pointer with NULL source3/torture/torture.c:4309:17: error: ‘pname’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 4309 | printf("qfilename gave different name? [%s] [%s]\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4310 | fname, pname); | ~~~~~~~~~~~~~ Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Dec 11 00:25:46 UTC 2021 on sn-devel-184 --- diff --git a/source3/torture/torture.c b/source3/torture/torture.c index b69125202f2..a68fc63f177 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -4391,7 +4391,7 @@ static bool run_trans2test(int dummy) const char *fname = "\\trans2.tst"; const char *dname = "\\trans2"; const char *fname2 = "\\trans2\\trans2.tst"; - char *pname; + char *pname = NULL; bool correct = True; NTSTATUS status; uint32_t fs_attr;