summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/apimagic/apimagic.h2
-rw-r--r--project/overrides.mk1
-rw-r--r--src/apimagic.c2
-rw-r--r--src/driver/amgc_amain.c4
4 files changed, 5 insertions, 4 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h
index ceda5c9..0329c97 100644
--- a/include/apimagic/apimagic.h
+++ b/include/apimagic/apimagic.h
@@ -209,7 +209,7 @@ amgc_api int amgc_set_driver_fdctx (struct amgc_driver_ctx *, const struct
amgc_api int amgc_lang_std_from_string (const char *);
/* utility api */
-amgc_api int amgc_main (int, char **, char **, const struct amgc_fd_ctx *);
+amgc_api int amgc_main (char **, char **, const struct amgc_fd_ctx *);
amgc_api int amgc_list_unit_defines (const struct amgc_driver_ctx *,
const struct amgc_unit_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/apimagic.c b/src/apimagic.c
index 32e8e96..4204276 100644
--- a/src/apimagic.c
+++ b/src/apimagic.c
@@ -8,5 +8,5 @@
int main(int argc, char ** argv, char ** envp)
{
- return amgc_main(argc,argv,envp,0);
+ return amgc_main(argv,envp,0);
}
diff --git a/src/driver/amgc_amain.c b/src/driver/amgc_amain.c
index 9325a4f..cf4540d 100644
--- a/src/driver/amgc_amain.c
+++ b/src/driver/amgc_amain.c
@@ -64,7 +64,7 @@ static int amgc_exit(struct amgc_driver_ctx * dctx, int ret)
return ret;
}
-int amgc_main(int argc, char ** argv, char ** envp, const struct amgc_fd_ctx * fdctx)
+int amgc_main(char ** argv, char ** envp, const struct amgc_fd_ctx * fdctx)
{
int ret;
int fdout;
@@ -78,7 +78,7 @@ int amgc_main(int argc, char ** argv, char ** envp, const struct amgc_fd_ctx * f
if ((ret = amgc_get_driver_ctx(argv,envp,flags,fdctx,&dctx)))
return (ret == AMGC_USAGE)
- ? !--argc
+ ? !argv || !argv[0] || !argv[1]
: AMGC_ERROR;
if (dctx->cctx->drvflags & AMGC_DRIVER_VERSION)