[syslinux:elflink] elflink: Fix module_load() compiler warnings
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Tue Apr 17 11:24:11 PDT 2012
Commit-ID: 3fd6565d6081e5e0e2ecb633b1d7131a85450a10
Gitweb: http://www.syslinux.org/commit/3fd6565d6081e5e0e2ecb633b1d7131a85450a10
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 2 Apr 2012 11:24:04 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 17 Apr 2012 10:58:33 +0100
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 at intel.com>
---
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 581529b..1f9ccfa 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);
}
}
More information about the Syslinux-commits
mailing list