From 1cf502784432cb08c930d3629d8dea4898a76352 Mon Sep 17 00:00:00 2001 From: midipix Date: Aug 09 2018 10:06:17 +0000 Subject: front-end utility: ntux_main(): remove the redundant argc parameter. --- diff --git a/include/ntux/ntux.h b/include/ntux/ntux.h index d43e8ad..76a1965 100644 --- a/include/ntux/ntux.h +++ b/include/ntux/ntux.h @@ -130,7 +130,7 @@ ntux_api int ntux_cmd_spawn (const struct ntux_driver_ctx *); ntux_api int ntux_cmd_strace (const struct ntux_driver_ctx *); /* utility api */ -ntux_api int ntux_main (int, char **, char **, const struct ntux_fd_ctx *); +ntux_api int ntux_main (char **, char **, const struct ntux_fd_ctx *); /* error trace api */ ntux_api int ntux_output_error_vector (const struct ntux_driver_ctx *); diff --git a/project/overrides.mk b/project/overrides.mk index e69de29..4ac3b36 100644 --- a/project/overrides.mk +++ b/project/overrides.mk @@ -0,0 +1 @@ +src/$(PACKAGE).o: CFLAGS_CONFIG += -Wno-unused-parameter diff --git a/src/driver/ntux_amain.c b/src/driver/ntux_amain.c index 22a1403..0a24125 100644 --- a/src/driver/ntux_amain.c +++ b/src/driver/ntux_amain.c @@ -64,7 +64,7 @@ static int ntux_exit(struct ntux_driver_ctx * dctx, int ret) return ret; } -int ntux_main(int argc, char ** argv, char ** envp, const struct ntux_fd_ctx * fdctx) +int ntux_main(char ** argv, char ** envp, const struct ntux_fd_ctx * fdctx) { int ret; int fdout; @@ -77,7 +77,7 @@ int ntux_main(int argc, char ** argv, char ** envp, const struct ntux_fd_ctx * f if ((ret = ntux_get_driver_ctx(argv,envp,flags,fdctx,&dctx))) return (ret == NTUX_USAGE) - ? !--argc + ? !argv || !argv[0] || !argv[1] : NTUX_ERROR; if (dctx->cctx->drvflags & NTUX_DRIVER_VERSION) diff --git a/src/ntux.c b/src/ntux.c index 7629d7e..8f5e583 100644 --- a/src/ntux.c +++ b/src/ntux.c @@ -26,7 +26,7 @@ int ntux_entry_routine( /* invoke main */ __sys_exit_group( - ntux_main(argc,argv,envp,0)); + ntux_main(argv,envp,0)); return NT_STATUS_INTERNAL_ERROR; }