From: Benno Schulenberg Date: Wed, 2 Apr 2014 20:17:05 +0000 (+0000) Subject: Silencing a compiler warning about a possibly uninitialized variable. X-Git-Tag: v2.3.3~226 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4171477fb5811cd83fca570ba4ad07e982b70f8f;p=nano.git Silencing a compiler warning about a possibly uninitialized variable. Patch by Mike Frysinger (from November 2011). git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 39617ca0..fcda1ad5 100644 --- 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 * doc/syntax/go.nanorc: basic go syntax highlighting diff --git a/src/search.c b/src/search.c index b29c7d33..e24b2e18 100644 --- a/src/search.c +++ b/src/search.c @@ -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) {