From: deraadt Date: Tue, 2 Mar 2021 17:11:28 +0000 (+0000) Subject: satisfy older gcc with poor warning generation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6700498effd92d198633c9e157ef48a0945c611a;p=openbsd satisfy older gcc with poor warning generation --- diff --git a/sbin/resolvd/resolvd.c b/sbin/resolvd/resolvd.c index 71df3c4e300..1e2ec871d5a 100644 --- a/sbin/resolvd/resolvd.c +++ b/sbin/resolvd/resolvd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolvd.c,v 1.8 2021/03/02 16:39:46 deraadt Exp $ */ +/* $OpenBSD: resolvd.c,v 1.9 2021/03/02 17:11:28 deraadt Exp $ */ /* * Copyright (c) 2021 Florian Obser * Copyright (c) 2021 Theo de Raadt @@ -163,7 +163,7 @@ main(int argc, char *argv[]) int rtfilter, nready, lockfd; struct kevent kev[3]; #ifndef SMALL - int unwindsock; + int unwindsock = -1; #endif while ((ch = getopt(argc, argv, "dv")) != -1) { @@ -281,7 +281,7 @@ main(int argc, char *argv[]) for (i = 0; i < nready; i++) { unsigned short fflags = kev[i].fflags; - switch ((int)kev[i].udata) { + switch ((int)(long)kev[i].udata) { case KQ_ROUTE: route_receive(routesock); break;