Commit 55a0d76c authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Fixing a few compiler warnings.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 10 additions and 7 deletions
+10 -7
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* configure.ac, m4/ax_check_compile_flag.m4 - Start building * configure.ac, m4/ax_check_compile_flag.m4 - Start building
with warnings enabled by default, to help prevent issues from with warnings enabled by default, to help prevent issues from
silently creeping in. Patch by Mike Frysinger. silently creeping in. Patch by Mike Frysinger.
* src/{nano,move,winio}.c - Fix a few compiler warnings.
2014-03-23 Benno Schulenberg <bensberg@justemail.net> 2014-03-23 Benno Schulenberg <bensberg@justemail.net>
* src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a * src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a
......
...@@ -79,8 +79,8 @@ void do_page_up(void) ...@@ -79,8 +79,8 @@ void do_page_up(void)
if (ISSET(SOFTWRAP) && openfile->current) { if (ISSET(SOFTWRAP) && openfile->current) {
skipped += strlenpt(openfile->current->data) / COLS; skipped += strlenpt(openfile->current->data) / COLS;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %ld len %d\n", i, (unsigned long) skipped, fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %lu len %d\n",
openfile->current->lineno, strlenpt(openfile->current->data)); i, skipped, (unsigned long) openfile->current->lineno, strlenpt(openfile->current->data));
#endif #endif
} }
} }
...@@ -89,7 +89,8 @@ openfile->current->lineno, strlenpt(openfile->current->data)); ...@@ -89,7 +89,8 @@ openfile->current->lineno, strlenpt(openfile->current->data));
openfile->placewewant); openfile->placewewant);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "do_page_up: openfile->current->lineno = %lu, skipped = %d\n", (unsigned long) openfile->current->lineno, skipped); fprintf(stderr, "do_page_up: openfile->current->lineno = %lu, skipped = %d\n",
(unsigned long) openfile->current->lineno, skipped);
#endif #endif
/* Scroll the edit window up a page. */ /* Scroll the edit window up a page. */
......
...@@ -2576,7 +2576,7 @@ int main(int argc, char **argv) ...@@ -2576,7 +2576,7 @@ int main(int argc, char **argv)
#if !defined(NANO_TINY) && defined(ENABLE_NANORC) #if !defined(NANO_TINY) && defined(ENABLE_NANORC)
/* If whitespace wasn't specified, set its default value. */ /* If whitespace wasn't specified, set its default value. */
if (whitespace == NULL) if (whitespace == NULL) {
if (using_utf8()) { if (using_utf8()) {
whitespace = mallocstrcpy(NULL, "»·"); whitespace = mallocstrcpy(NULL, "»·");
whitespace_len[0] = 2; whitespace_len[0] = 2;
...@@ -2586,6 +2586,7 @@ int main(int argc, char **argv) ...@@ -2586,6 +2586,7 @@ int main(int argc, char **argv)
whitespace_len[0] = 1; whitespace_len[0] = 1;
whitespace_len[1] = 1; whitespace_len[1] = 1;
} }
}
#endif #endif
/* If tabsize wasn't specified, set its default value. */ /* If tabsize wasn't specified, set its default value. */
......
...@@ -2971,7 +2971,7 @@ void compute_maxrows(void) ...@@ -2971,7 +2971,7 @@ void compute_maxrows(void)
maxrows += editwinrows - n; maxrows += editwinrows - n;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "compute_maxrows(): maxrows = %ld\n", maxrows); fprintf(stderr, "compute_maxrows(): maxrows = %i\n", maxrows);
#endif #endif
} }
...@@ -3105,8 +3105,8 @@ void edit_redraw(filestruct *old_current, size_t pww_save) ...@@ -3105,8 +3105,8 @@ void edit_redraw(filestruct *old_current, size_t pww_save)
openfile->edittop->lineno + maxrows) { openfile->edittop->lineno + maxrows) {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "edit_redraw(): line %lu was offscreen, oldcurrent = %lu edittop = %lu", openfile->current->lineno, fprintf(stderr, "edit_redraw(): line %d was offscreen, oldcurrent = %d edittop = %d",
old_current->lineno, openfile->edittop->lineno); openfile->current->lineno, old_current->lineno, openfile->edittop->lineno);
#endif #endif
#ifndef NANO_TINY #ifndef NANO_TINY
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment