aboutsummaryrefslogtreecommitdiff
path: root/jim-load.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2012-01-19 11:11:59 +1000
committerSteve Bennett <steveb@workware.net.au>2012-01-19 11:13:04 +1000
commit01cf806d4bc5a87170acbece47d42dd33a092d8d (patch)
treec3c7c0cfcac3878ba0825caacc5eb19587f7415f /jim-load.c
parent46fb9d7ffdce5ccb7375f8ca86eca6d328e6363d (diff)
downloadjimtcl-01cf806d4bc5a87170acbece47d42dd33a092d8d.zip
jimtcl-01cf806d4bc5a87170acbece47d42dd33a092d8d.tar.gz
jimtcl-01cf806d4bc5a87170acbece47d42dd33a092d8d.tar.bz2
Fix some warnings identified by icc
The Intel C Compiler Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-load.c')
-rw-r--r--jim-load.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/jim-load.c b/jim-load.c
index 72aa263..f9255dc 100644
--- a/jim-load.c
+++ b/jim-load.c
@@ -41,7 +41,8 @@ int Jim_LoadLibrary(Jim_Interp *interp, const char *pathName)
const char *pkgname;
int pkgnamelen;
char initsym[40];
- int (*onload) (Jim_Interp *);
+ typedef int jim_module_init_func_type(Jim_Interp *);
+ jim_module_init_func_type *onload;
pt = strrchr(pathName, '/');
if (pt) {
@@ -59,7 +60,7 @@ int Jim_LoadLibrary(Jim_Interp *interp, const char *pathName)
}
snprintf(initsym, sizeof(initsym), "Jim_%.*sInit", pkgnamelen, pkgname);
- if ((onload = dlsym(handle, initsym)) == NULL) {
+ if ((onload = (jim_module_init_func_type *)dlsym(handle, initsym)) == NULL) {
Jim_SetResultFormatted(interp,
"No %s symbol found in extension %s", initsym, pathName);
}