]> git.wh0rd.org Git - nano.git/commitdiff
Avoiding an unfounded warning about a possibly uninitialized variable.
authorBenno Schulenberg <bensberg@justemail.net>
Fri, 17 Jul 2015 21:11:32 +0000 (21:11 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Fri, 17 Jul 2015 21:11:32 +0000 (21:11 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5306 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/text.c

index ffb2ad5669cde9d87ec5f6d180f4f1c410b802ee..74a28bf1209638c254f81531a3ebe3034c09dda0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
        work at startup.  It no longer worked because the assigned value gets
        overwritten by a later initialization of 'last_search' to the empty
        string.  Found through the use of valgrind.
+       * src/text.c (do_alt_speller): Avoid an unfounded warning about a
+       possibly uninitialized variable.
 
 2015-07-17  Mike Frysinger  <vapier@gentoo.org>
        * src/browser.c (browser_refresh): Use the proper type (off_t) for
index a057f5ed8c1448660e9b03154df941a1375d3495..aa0d25464c738bfae3deb97e577406afc15c30bf 100644 (file)
@@ -2666,7 +2666,7 @@ const char *do_alt_speller(char *tempfile_name)
         * the alternate spell command.  The line that mark_begin points
         * to will be freed, so we save the line number and restore it
         * afterwards. */
-    size_t size_of_surrounding;
+    size_t size_of_surrounding = 0;
        /* The size of the text outside of a marked region. */
 #endif