From 6700498effd92d198633c9e157ef48a0945c611a Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 2 Mar 2021 17:11:28 +0000 Subject: [PATCH] satisfy older gcc with poor warning generation --- sbin/resolvd/resolvd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.20.1