diff --git a/src/chars.c b/src/chars.c index 3ed88b0054e86e0128ad75612bbf5ed5c43ea3c8..474c913fe815e086191e5fdb2f40b77efeca290e 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 25609e1244388ea2ea11a7135efac617c2d63e02..1d9e08fbfea103cdcafdaf10b520907bd8b34df7 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 bd3c8033e0c6ed9e9549259aef1b1f58c373fd14..bc7c4044fd62cf554b7add79ca77dc3bf4653f35 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;