diff options
| author | Paul Eggert | 2015-11-19 11:49:27 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-11-19 11:50:16 -0800 |
| commit | 62d787ed124726fd1f73dcfb7227d83bc5940fcc (patch) | |
| tree | f2fbfa26961709470101b1898cef1763100f0a8d /src | |
| parent | c8a972b0c3082edfcca4a85562224499f75bfe9b (diff) | |
| download | emacs-62d787ed124726fd1f73dcfb7227d83bc5940fcc.tar.gz emacs-62d787ed124726fd1f73dcfb7227d83bc5940fcc.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynlib.c | 4 | ||||
| -rw-r--r-- | src/eval.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 1 | ||||
| -rw-r--r-- | src/module.c | 4 |
4 files changed, 8 insertions, 3 deletions
diff --git a/src/dynlib.c b/src/dynlib.c index 491a08e0787..ed4f157d0fe 100644 --- a/src/dynlib.c +++ b/src/dynlib.c | |||
| @@ -103,11 +103,15 @@ dynlib_error (void) | |||
| 103 | return dlerror (); | 103 | return dlerror (); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /* FIXME: Currently there is no way to unload a module, so this | ||
| 107 | function is never used. */ | ||
| 108 | #if false | ||
| 106 | int | 109 | int |
| 107 | dynlib_close (dynlib_handle_ptr h) | 110 | dynlib_close (dynlib_handle_ptr h) |
| 108 | { | 111 | { |
| 109 | return dlclose (h) == 0; | 112 | return dlclose (h) == 0; |
| 110 | } | 113 | } |
| 114 | #endif | ||
| 111 | 115 | ||
| 112 | #else | 116 | #else |
| 113 | 117 | ||
diff --git a/src/eval.c b/src/eval.c index 396ca84a71d..9c171473b43 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -61,7 +61,7 @@ union specbinding *specpdl_ptr; | |||
| 61 | 61 | ||
| 62 | /* Depth in Lisp evaluations and function calls. */ | 62 | /* Depth in Lisp evaluations and function calls. */ |
| 63 | 63 | ||
| 64 | EMACS_INT lisp_eval_depth; | 64 | static EMACS_INT lisp_eval_depth; |
| 65 | 65 | ||
| 66 | /* The value of num_nonmacro_input_events as of the last time we | 66 | /* The value of num_nonmacro_input_events as of the last time we |
| 67 | started to enter the debugger. If we decide to enter the debugger | 67 | started to enter the debugger. If we decide to enter the debugger |
diff --git a/src/lisp.h b/src/lisp.h index ce5a6d2aea8..f953ceb582f 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3837,7 +3837,6 @@ intern_c_string (const char *str) | |||
| 3837 | } | 3837 | } |
| 3838 | 3838 | ||
| 3839 | /* Defined in eval.c. */ | 3839 | /* Defined in eval.c. */ |
| 3840 | extern EMACS_INT lisp_eval_depth; | ||
| 3841 | extern Lisp_Object Vautoload_queue; | 3840 | extern Lisp_Object Vautoload_queue; |
| 3842 | extern Lisp_Object Vrun_hooks; | 3841 | extern Lisp_Object Vrun_hooks; |
| 3843 | extern Lisp_Object Vsignaling_function; | 3842 | extern Lisp_Object Vsignaling_function; |
diff --git a/src/module.c b/src/module.c index 35a9f48eb12..98264df35a9 100644 --- a/src/module.c +++ b/src/module.c | |||
| @@ -697,7 +697,7 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0, | |||
| 697 | void *gpl_sym; | 697 | void *gpl_sym; |
| 698 | 698 | ||
| 699 | CHECK_STRING (file); | 699 | CHECK_STRING (file); |
| 700 | handle = dynlib_open (SDATA (file)); | 700 | handle = dynlib_open (SSDATA (file)); |
| 701 | if (!handle) | 701 | if (!handle) |
| 702 | error ("Cannot load file %s: %s", SDATA (file), dynlib_error ()); | 702 | error ("Cannot load file %s: %s", SDATA (file), dynlib_error ()); |
| 703 | 703 | ||
| @@ -789,6 +789,8 @@ ARGLIST is a list of arguments passed to SUBRPTR. */) | |||
| 789 | finalize_environment (&env); | 789 | finalize_environment (&env); |
| 790 | Fthrow (tag, value); | 790 | Fthrow (tag, value); |
| 791 | } | 791 | } |
| 792 | default: | ||
| 793 | eassume (false); | ||
| 792 | } | 794 | } |
| 793 | } | 795 | } |
| 794 | 796 | ||