]> git.wh0rd.org Git - nano.git/commitdiff
Silencing a compiler warning about a possibly uninitialized variable.
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 2 Apr 2014 20:17:05 +0000 (20:17 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Wed, 2 Apr 2014 20:17:05 +0000 (20:17 +0000)
Patch by Mike Frysinger (from November 2011).

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/search.c

index 39617ca0be9cfcee1d8fa30c3c45db5fb12219dd..fcda1ad54982911f19a304d2e518be7e9d6abc65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
        * .gitignore: Add 'config.cache', created by './configure -C'.
        * src/nano.c (die_save_file): Newer gcc warns about set-but-unused
        variables, so add a dummy if() check to kill that off.
+       * src/search.c (search_init): Silence a compiler warning about a
+       variable possibly being used uninitialized.
 
 2014-03-31 Chris Allegretta <chrisa@asty.org>
        * doc/syntax/go.nanorc: basic go syntax highlighting
index b29c7d33090bebd6d48da849682357f54ab6f0a6..e24b2e189a955743ff3dc60e2f475a1f97da2c68 100644 (file)
@@ -219,7 +219,7 @@ int search_init(bool replacing, bool use_answer)
        statusbar(_("Cancelled"));
        return -1;
     } else {
-       void (*func)(void);
+       void (*func)(void) = NULL;
 
        for  (s = sclist; s != NULL; s = s->next)
            if ((s->menu & currmenu) && i == s->seq) {