compiler still complains about "handle" (scripting/ejs/smbscrip.c:46) possibly
not being initialized and to me this looks true.
Running smbscript with the trivial write("Hello, world\n"); also leaves some
memory around.
Volker
MprVar result;
char *emsg;
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s <scriptfile>\n", argv[0]);
+ exit(1);
+ }
+
if (ejsOpen(NULL, NULL, NULL) != 0) {
fprintf(stderr, "smbscript: ejsOpen(): unable to initialise "
"EJ subsystem\n");
exit(1);
}
- if (ejsEvalFile(eid, (char *)argv[1], &result, &emsg) == -1) {
+ if (ejsEvalFile(eid, discard_const_p(char, argv[1]), &result,
+ &emsg) == -1) {
fprintf(stderr, "smbscript: ejsEvalScript(): %s\n", emsg);
exit(1);
}