From 4cc2462ed46f6f97930ec1570260d755d4e0f6a4 Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Thu, 3 Jan 2013 04:23:10 +0000
Subject: [PATCH] Clean-up warnings with -pedantic.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 src/chars.c | 4 ++--
 src/files.c | 2 +-
 src/winio.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/chars.c b/src/chars.c
index 3ed88b00..474c913f 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -79,12 +79,12 @@ bool is_byte(int c)
     return ((unsigned int)c == (unsigned char)c);
 }
 
-static void mbtowc_reset(void)
+void mbtowc_reset(void)
 {
     IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0));
 }
 
-static void wctomb_reset(void)
+void wctomb_reset(void)
 {
     IGNORE_CALL_RESULT(wctomb(NULL, 0));
 }
diff --git a/src/files.c b/src/files.c
index 25609e12..1d9e08fb 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1695,7 +1695,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
 	/* The actual file, realname, we are writing to. */
     char *tempname = NULL;
 	/* The temp file name we write to on prepend. */
-    int backup_cflags;
 
     assert(name != NULL);
 
@@ -1758,6 +1757,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
 	char *backupname;
 	struct utimbuf filetime;
 	int copy_status;
+	int backup_cflags;
 
 	/* Save the original file's access and modification times. */
 	filetime.actime = openfile->current_stat->st_atime;
diff --git a/src/winio.c b/src/winio.c
index bd3c8033..bc7c4044 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3173,7 +3173,6 @@ void edit_redraw(filestruct *old_current, size_t pww_save)
     fprintf(stderr, "edit_redraw(): line %lu was offscreen, oldcurrent = %lu edittop = %lu", openfile->current->lineno,
                     old_current->lineno, openfile->edittop->lineno);
 #endif
-	filestruct *old_edittop = openfile->edittop;
 
 #ifndef NANO_TINY
 	/* If the mark is on, update all the lines between old_current
@@ -3181,6 +3180,7 @@ void edit_redraw(filestruct *old_current, size_t pww_save)
 	 * whether we've scrolled up or down) of the edit window. */
 	if (openfile->mark_set) {
 	    ssize_t old_lineno;
+	    filestruct *old_edittop = openfile->edittop;
 
 	    if (old_edittop->lineno < openfile->edittop->lineno)
 		old_lineno = old_edittop->lineno;
-- 
GitLab