From 2a7996c7f3867be848ba431c6e044d42f4700c23 Mon Sep 17 00:00:00 2001 From: adrian Date: Sun, 1 Nov 2020 15:57:14 +0000 Subject: [PATCH] [iscsictl] Fix compile issues that creep up with gcc-6.4 This fixes two warnings: * double-definition of a symbol in a yacc header * Comparison of an unsigned int being >= 0; that's always going to be true. Reviewed by: imp, rscheff Differential Revision: https://reviews.freebsd.org/D27036 --- usr.bin/iscsictl/parse.y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/iscsictl/parse.y b/usr.bin/iscsictl/parse.y index aac620a083f6..333a512b5905 100644 --- a/usr.bin/iscsictl/parse.y +++ b/usr.bin/iscsictl/parse.y @@ -54,7 +54,6 @@ static struct conf *conf; static struct target *target; extern void yyerror(const char *); -extern int yylex(void); extern void yyrestart(FILE *); %} @@ -359,7 +358,7 @@ pcp: PCP EQUALS STR free($3); return(1); } - if (!((tmp >=0) && (tmp <= 7))) { + if (tmp > 7) { yyerror("invalid pcp value"); return(1); }