From: Chris Allegretta Date: Tue, 4 Mar 2014 03:55:43 +0000 (+0000) Subject: 2014-03-01 Chris Allegretta X-Git-Tag: v2.3.3~293 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3a5f55e43952a00b561ebbcc41ee5a6ea4bcafe2;p=nano.git 2014-03-01 Chris Allegretta * global.c (shortcut_init) - Don't actually free the shortcut list, since the next pass via justifying will then remove all custom shortcuts. Fixed bug discovered by Benno Schulenberg. * text.c (do_linter) - Remove some unused variables to quiet -pedanic -Wall. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4637 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 335bd451..aaa3e7fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-03-01 Chris Allegretta + * global.c (shortcut_init) - Don't actually free the shortcut + list, since the next pass via justifying will then remove + all custom shortcuts. Fixed bug discovered by Benno Schulenberg. + * text.c (do_linter) - Remove some unused variables to quiet + -pedanic -Wall. + 2014-03-03 Benno Schulenberg * src/global.c (add_to_funcs) - Add a newline, for clarity. * src/global.c (shortcut_init) - Mark, don't translate yet. diff --git a/src/global.c b/src/global.c index 9ccaf676..ac6359b7 100644 --- a/src/global.c +++ b/src/global.c @@ -1128,12 +1128,6 @@ void shortcut_init(bool unjustify) currmenu = MMAIN; - while (sclist != NULL) { - sc *s = sclist; - sclist = (s)->next; - free(s); - } - add_to_sclist(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER, "^G", do_help_void, 0, TRUE); add_to_sclist(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE|MWRITEFILE|MINSERTFILE|MEXTCMD|MSPELL|MBROWSER|MWHEREISFILE|MGOTODIR|MLINTER, diff --git a/src/text.c b/src/text.c index e514772c..ef022f37 100644 --- a/src/text.c +++ b/src/text.c @@ -2984,12 +2984,11 @@ void do_linter(void) char *read_buff, *read_buff_ptr, *read_buff_word, *ptr; size_t pipe_buff_size, read_buff_size, read_buff_read, bytesread; size_t parsesuccess = 0; - int lint_fd[2], tempfile_fd = -1; + int lint_fd[2]; pid_t pid_lint; int lint_status; static int arglen = 3; static char **lintargs = NULL; - FILE *temp_file; char *lintcopy; char *convendptr = NULL; const sc *s; @@ -3186,7 +3185,6 @@ void do_linter(void) ssize_t tmpcol = 1; int kbinput; bool meta_key, func_key; - struct stat lintfileinfo; if (curlint->colno > 0) tmpcol = curlint->colno;