From: deraadt Date: Mon, 19 Jan 2015 02:44:53 +0000 (+0000) Subject: gcc does not understand that the loop conditionally sets bsod before X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=735042e9ac9041ea3ce20e612a9231551562bf3b;p=openbsd gcc does not understand that the loop conditionally sets bsod before using it, so it warns... Copy the warning silencing code from the same function in ../ld.so --- diff --git a/libexec/ld.so/ldconfig/library.c b/libexec/ld.so/ldconfig/library.c index 4b1ff1059e7..e42c0c7def1 100644 --- a/libexec/ld.so/ldconfig/library.c +++ b/libexec/ld.so/ldconfig/library.c @@ -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 * @@ -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;