From 320cc7656e4c177f7cb30f1d57f081fa26b527e5 Mon Sep 17 00:00:00 2001 From: Sergey Bolshakov Date: Sun, 16 Mar 2008 00:12:25 +0300 Subject: [PATCH] fix few compiler warnings --- init.c | 1 + modules.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/init.c b/init.c index daa8b3e..3825df0 100644 --- a/init.c +++ b/init.c @@ -59,6 +59,7 @@ char *udevtrigger[] = {"/sbin/udevtrigger", NULL}; char *udevsettle[] = {"/sbin/udevsettle", NULL}; extern void stage1(); +void fatal(const char *) __attribute__((noreturn)); /* * this needs to handle the following cases: diff --git a/modules.c b/modules.c index 077836a..b8fd50d 100644 --- a/modules.c +++ b/modules.c @@ -100,11 +100,7 @@ static enum insmod_return modprobe(const char * mod_name, char * options) { int pid, status; if (!(pid = fork())) { - char * argv[4]; - argv[0] = "/sbin/modprobe"; - argv[1] = mod_name; - argv[2] = options; - argv[3] = NULL; + char * argv[] = { "/sbin/modprobe", (char *)mod_name, options, NULL }; execve(argv[0], argv, NULL); log_message("modprobe %s failed", mod_name); }