diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-04-02 11:24:04 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-04-17 10:58:33 +0100 |
commit | 3fd6565d6081e5e0e2ecb633b1d7131a85450a10 (patch) | |
tree | 4d10497c19af3180a306a01bfcd54cb0edffadb8 | |
parent | fdb708671b70182c597bed2fb0ed8d404e9f9b37 (diff) | |
download | syslinux-3fd6565d6081e5e0e2ecb633b1d7131a85450a10.tar.gz syslinux-3fd6565d6081e5e0e2ecb633b1d7131a85450a10.tar.xz syslinux-3fd6565d6081e5e0e2ecb633b1d7131a85450a10.zip |
elflink: Fix module_load() compiler warnings
Correct the 'argv' argument to spawn_load() in module_load() and
include the header containing the spawn_load() prototype, thereby
fixing the following warning,
sys/module/elf_module.c: In function ‘module_load’:
sys/module/elf_module.c:534:5: warning: initialization makes integer from pointer without a cast
sys/module/elf_module.c:534:5: warning: initialization makes integer from pointer without a cast
sys/module/elf_module.c:535:5: warning: implicit declaration of function ‘spawn_load’
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | com32/lib/sys/module/elf_module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c index 581529be..1f9ccfae 100644 --- a/com32/lib/sys/module/elf_module.c +++ b/com32/lib/sys/module/elf_module.c @@ -14,6 +14,7 @@ #include <linux/list.h> #include <sys/module.h> +#include <sys/exec.h> #include "elfutils.h" #include "common.h" @@ -531,7 +532,7 @@ int module_load(struct elf_module *module) { } if (*p++ == '/') { - char argv[2] = { p, NULL }; + char *argv[2] = { p, NULL }; spawn_load(p, 1, argv); } } |