gcc does not understand that the loop conditionally sets bsod before
authorderaadt <deraadt@openbsd.org>
Mon, 19 Jan 2015 02:44:53 +0000 (02:44 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 19 Jan 2015 02:44:53 +0000 (02:44 +0000)
using it, so it warns...  Copy the warning silencing code from the
same function in ../ld.so

libexec/ld.so/ldconfig/library.c

index 4b1ff10..e42c0c7 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.7 2015/01/16 16:18:07 deraadt Exp $ */
+/* $OpenBSD: library.c,v 1.8 2015/01/19 02:44:53 deraadt Exp $ */
 /*
  * Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
  *
@@ -199,6 +199,7 @@ nohints:
                else
                        searchpath = _dl_default_path;
        }
+       memset(&bsod, 0, sizeof(bsod));
        for (pp = searchpath; *pp != NULL; pp++) {
                if ((dd = opendir(*pp)) != NULL) {
                        match = 0;