mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Fix minor module problems found by static checking
* src/dynlib.c (dynlib_close): #ifdef out for now, as it’s not used. * src/eval.c, src/lisp.h (lisp_eval_depth): Now static. * src/module.c (Fmodule_load): Fix pointer signedness bug. (Fmodule_call): Tell GCC that the default case is unreachable.
This commit is contained in:
parent
c8a972b0c3
commit
62d787ed12
4 changed files with 8 additions and 3 deletions
|
|
@ -103,11 +103,15 @@ dynlib_error (void)
|
|||
return dlerror ();
|
||||
}
|
||||
|
||||
/* FIXME: Currently there is no way to unload a module, so this
|
||||
function is never used. */
|
||||
#if false
|
||||
int
|
||||
dynlib_close (dynlib_handle_ptr h)
|
||||
{
|
||||
return dlclose (h) == 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ union specbinding *specpdl_ptr;
|
|||
|
||||
/* Depth in Lisp evaluations and function calls. */
|
||||
|
||||
EMACS_INT lisp_eval_depth;
|
||||
static EMACS_INT lisp_eval_depth;
|
||||
|
||||
/* The value of num_nonmacro_input_events as of the last time we
|
||||
started to enter the debugger. If we decide to enter the debugger
|
||||
|
|
|
|||
|
|
@ -3837,7 +3837,6 @@ intern_c_string (const char *str)
|
|||
}
|
||||
|
||||
/* Defined in eval.c. */
|
||||
extern EMACS_INT lisp_eval_depth;
|
||||
extern Lisp_Object Vautoload_queue;
|
||||
extern Lisp_Object Vrun_hooks;
|
||||
extern Lisp_Object Vsignaling_function;
|
||||
|
|
|
|||
|
|
@ -697,7 +697,7 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0,
|
|||
void *gpl_sym;
|
||||
|
||||
CHECK_STRING (file);
|
||||
handle = dynlib_open (SDATA (file));
|
||||
handle = dynlib_open (SSDATA (file));
|
||||
if (!handle)
|
||||
error ("Cannot load file %s: %s", SDATA (file), dynlib_error ());
|
||||
|
||||
|
|
@ -789,6 +789,8 @@ ARGLIST is a list of arguments passed to SUBRPTR. */)
|
|||
finalize_environment (&env);
|
||||
Fthrow (tag, value);
|
||||
}
|
||||
default:
|
||||
eassume (false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue