aboutsummaryrefslogtreecommitdiff
path: root/stand/common
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-05-01 15:35:16 +0000
committerWarner Losh <imp@FreeBSD.org>2023-05-01 21:02:54 +0000
commitcb8179079ab08263b0e3835655a83a8915f33eb4 (patch)
treee168476fa8ea277a93f2227b3b9743cc41607bf2 /stand/common
parent5328f9034fc410b105629700a1309bebf094266a (diff)
stand: Fix warning about variable unused
dflag is unused when LOADER_VERIEXEC isn't defined, so move it under the ifdef. Sponsored by: Netflix
Diffstat (limited to 'stand/common')
-rw-r--r--stand/common/module.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/stand/common/module.c b/stand/common/module.c
index 43c04728b4fa..9902309b7f99 100644
--- a/stand/common/module.c
+++ b/stand/common/module.c
@@ -114,10 +114,14 @@ command_load(int argc, char *argv[])
char *typestr;
#ifdef LOADER_VERIEXEC
char *prefix, *skip;
+ int dflag = 0;
+ char *args = "dkp:s:t:";
+#else
+ char *args = "kt:";
#endif
- int dflag, dofile, dokld, ch, error;
+ int dofile, dokld, ch, error;
- dflag = dokld = dofile = 0;
+ dokld = dofile = 0;
optind = 1;
optreset = 1;
typestr = NULL;
@@ -129,11 +133,13 @@ command_load(int argc, char *argv[])
prefix = NULL;
skip = NULL;
#endif
- while ((ch = getopt(argc, argv, "dkp:s:t:")) != -1) {
+ while ((ch = getopt(argc, argv, args)) != -1) {
switch(ch) {
+#ifdef LOADER_VERIEXEC
case 'd':
dflag++;
break;
+#endif
case 'k':
dokld = 1;
break;