summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-09-09 15:04:37 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-09-09 15:04:37 +0000
commit5373bda294bc179d6bb876ae686a1652a5128d7f (patch)
tree3c4d6e4dd9e0b7e04193187476e1d5227384b70f /usr.sbin/bgpd
parent681ff705857d2f9f5ae9b0d6df82d2798e5db5aa (diff)
Shut up a gcc warning about uninitialized use of min & max by adding a default
case in the switch statement. Found by denis@ and fix proposed by sthen@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 5b22217a1ea..fae82a22ad4 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.347 2018/09/09 14:27:24 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.348 2018/09/09 15:04:36 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -2202,6 +2202,9 @@ prefixlenop : /* empty */ { bzero(&$$, sizeof($$)); }
min = $3;
max = -1;
break;
+ default:
+ yyerror("unknown prefixlen operation");
+ YYERROR;
}
$$.len_min = min;
$$.len_max = max;