diff options
| author | Paul Eggert | 2013-06-03 11:29:30 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-06-03 11:29:30 -0700 |
| commit | 3d5ee10aa258a500e0b70b5eabe9d58cb3ab051e (patch) | |
| tree | 37d030ec632685a294eb351851fdad8ce41800b0 /src/eval.c | |
| parent | 068922a2973033ea826b458a17f3e06cf6b44299 (diff) | |
| download | emacs-3d5ee10aa258a500e0b70b5eabe9d58cb3ab051e.tar.gz emacs-3d5ee10aa258a500e0b70b5eabe9d58cb3ab051e.zip | |
Fix minor problems found by static checking.
* data.c (pure_write_error):
Use xsignal2, not Fsignal, as Fsignal might return.
* eval.c (set_backtrace_debug_on_exit): Now static.
(backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
No longer inline. EXTERN_INLINE is needed only for functions
defined in .h files. Reindent function header as per GNU style.
(backtrace_p, backtrace_top, backtrace_next):
Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
compiler or linker. Add extern decls to pacify gcc -Wall.
* frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
Now static.
* frame.c (free_monitors): Define only on platforms that need it.
* nsterm.m (ns_term_init):
* process.c (catch_child_signal):
Don't worry about whether SIGCHLD is defined, as SIGCHLD is
defined on all porting targets these days.
* process.c, process.h (catch_child_signal):
Make it extern only if NS_IMPL_GNUSTEP is defined.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c index d6236b6edf2..d1d074df777 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -117,21 +117,29 @@ static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); | |||
| 117 | 117 | ||
| 118 | /* Functions to modify slots of backtrace records. */ | 118 | /* Functions to modify slots of backtrace records. */ |
| 119 | 119 | ||
| 120 | static void set_backtrace_args (struct specbinding *pdl, Lisp_Object *args) | 120 | static void |
| 121 | set_backtrace_args (struct specbinding *pdl, Lisp_Object *args) | ||
| 121 | { eassert (pdl->kind == SPECPDL_BACKTRACE); pdl->v.bt.args = args; } | 122 | { eassert (pdl->kind == SPECPDL_BACKTRACE); pdl->v.bt.args = args; } |
| 122 | 123 | ||
| 123 | static void set_backtrace_nargs (struct specbinding *pdl, ptrdiff_t n) | 124 | static void |
| 125 | set_backtrace_nargs (struct specbinding *pdl, ptrdiff_t n) | ||
| 124 | { eassert (pdl->kind == SPECPDL_BACKTRACE); pdl->v.bt.nargs = n; } | 126 | { eassert (pdl->kind == SPECPDL_BACKTRACE); pdl->v.bt.nargs = n; } |
| 125 | 127 | ||
| 126 | void set_backtrace_debug_on_exit (struct specbinding *pdl, bool doe) | 128 | static void |
| 129 | set_backtrace_debug_on_exit (struct specbinding *pdl, bool doe) | ||
| 127 | { eassert (pdl->kind == SPECPDL_BACKTRACE); pdl->v.bt.debug_on_exit = doe; } | 130 | { eassert (pdl->kind == SPECPDL_BACKTRACE); pdl->v.bt.debug_on_exit = doe; } |
| 128 | 131 | ||
| 129 | /* Helper functions to scan the backtrace. */ | 132 | /* Helper functions to scan the backtrace. */ |
| 130 | 133 | ||
| 131 | EXTERN_INLINE bool backtrace_p (struct specbinding *pdl) | 134 | bool backtrace_p (struct specbinding *) EXTERNALLY_VISIBLE; |
| 135 | struct specbinding *backtrace_top (void) EXTERNALLY_VISIBLE; | ||
| 136 | struct specbinding *backtrace_next (struct specbinding *pdl) EXTERNALLY_VISIBLE; | ||
| 137 | |||
| 138 | bool backtrace_p (struct specbinding *pdl) | ||
| 132 | { return pdl >= specpdl; } | 139 | { return pdl >= specpdl; } |
| 133 | 140 | ||
| 134 | EXTERN_INLINE struct specbinding *backtrace_top (void) | 141 | struct specbinding * |
| 142 | backtrace_top (void) | ||
| 135 | { | 143 | { |
| 136 | struct specbinding *pdl = specpdl_ptr - 1; | 144 | struct specbinding *pdl = specpdl_ptr - 1; |
| 137 | while (backtrace_p (pdl) && pdl->kind != SPECPDL_BACKTRACE) | 145 | while (backtrace_p (pdl) && pdl->kind != SPECPDL_BACKTRACE) |
| @@ -139,7 +147,8 @@ EXTERN_INLINE struct specbinding *backtrace_top (void) | |||
| 139 | return pdl; | 147 | return pdl; |
| 140 | } | 148 | } |
| 141 | 149 | ||
| 142 | EXTERN_INLINE struct specbinding *backtrace_next (struct specbinding *pdl) | 150 | struct specbinding * |
| 151 | backtrace_next (struct specbinding *pdl) | ||
| 143 | { | 152 | { |
| 144 | pdl--; | 153 | pdl--; |
| 145 | while (backtrace_p (pdl) && pdl->kind != SPECPDL_BACKTRACE) | 154 | while (backtrace_p (pdl) && pdl->kind != SPECPDL_BACKTRACE) |
| @@ -1925,7 +1934,7 @@ grow_specpdl (void) | |||
| 1925 | specpdl_ptr = specpdl + count; | 1934 | specpdl_ptr = specpdl + count; |
| 1926 | } | 1935 | } |
| 1927 | 1936 | ||
| 1928 | LISP_INLINE void | 1937 | void |
| 1929 | record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) | 1938 | record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) |
| 1930 | { | 1939 | { |
| 1931 | eassert (nargs >= UNEVALLED); | 1940 | eassert (nargs >= UNEVALLED); |