summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-22 18:01:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-22 18:01:59 -0700
commitc9c49752e15c105ded153e9ab0a42743f57184e5 (patch)
treee395db95d87459082bace9fcf3a2cec0ea3d1aea /src/sysdep.c
parent9d0da923ebd2b78abb6e02f0b90cfe9d818eb301 (diff)
parentb9b4b7cb4c27f9f6ad644168f0e1241e5c0d6eaa (diff)
downloademacs-c9c49752e15c105ded153e9ab0a42743f57184e5.tar.gz
emacs-c9c49752e15c105ded153e9ab0a42743f57184e5.tar.bz2
emacs-c9c49752e15c105ded153e9ab0a42743f57184e5.zip
Fix more problems found by GCC 4.5.2's static checks.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 6ef3d88c5c8..14db0fd26d0 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -488,7 +488,8 @@ sys_subshell (void)
int pid;
struct save_signal saved_handlers[5];
Lisp_Object dir;
- unsigned char * IF_LINT (volatile) str = 0;
+ unsigned char *volatile str_volatile = 0;
+ unsigned char *str;
int len;
saved_handlers[0].code = SIGINT;
@@ -512,7 +513,7 @@ sys_subshell (void)
goto xyzzy;
dir = expand_and_dir_to_file (Funhandled_file_name_directory (dir), Qnil);
- str = (unsigned char *) alloca (SCHARS (dir) + 2);
+ str_volatile = str = (unsigned char *) alloca (SCHARS (dir) + 2);
len = SCHARS (dir);
memcpy (str, SDATA (dir), len);
if (str[len - 1] != '/') str[len++] = '/';
@@ -544,6 +545,7 @@ sys_subshell (void)
sh = "sh";
/* Use our buffer's default directory for the subshell. */
+ str = str_volatile;
if (str && chdir ((char *) str) != 0)
{
#ifndef DOS_NT