* configure.ac, m4/ax_check_compile_flag.m4 - Start building
with warnings enabled by default, to help prevent issues from
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>
* src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a
if (ISSET(SOFTWRAP) && openfile->current) {
skipped += strlenpt(openfile->current->data) / COLS;
#ifdef DEBUG
- fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %ld len %d\n", i, (unsigned long) skipped,
-openfile->current->lineno, strlenpt(openfile->current->data));
+ fprintf(stderr, "do_page_up: i = %d, skipped = %d based on line %lu len %d\n",
+ i, skipped, (unsigned long) openfile->current->lineno, strlenpt(openfile->current->data));
#endif
}
}
openfile->placewewant);
#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
/* Scroll the edit window up a page. */
#if !defined(NANO_TINY) && defined(ENABLE_NANORC)
/* If whitespace wasn't specified, set its default value. */
- if (whitespace == NULL)
+ if (whitespace == NULL) {
if (using_utf8()) {
whitespace = mallocstrcpy(NULL, "»·");
whitespace_len[0] = 2;
whitespace_len[0] = 1;
whitespace_len[1] = 1;
}
+ }
#endif
/* If tabsize wasn't specified, set its default value. */
maxrows += editwinrows - n;
#ifdef DEBUG
- fprintf(stderr, "compute_maxrows(): maxrows = %ld\n", maxrows);
+ fprintf(stderr, "compute_maxrows(): maxrows = %i\n", maxrows);
#endif
}
openfile->edittop->lineno + maxrows) {
#ifdef DEBUG
- fprintf(stderr, "edit_redraw(): line %lu was offscreen, oldcurrent = %lu edittop = %lu", openfile->current->lineno,
- old_current->lineno, openfile->edittop->lineno);
+ fprintf(stderr, "edit_redraw(): line %d was offscreen, oldcurrent = %d edittop = %d",
+ openfile->current->lineno, old_current->lineno, openfile->edittop->lineno);
#endif
#ifndef NANO_TINY