diff --git a/ChangeLog b/ChangeLog
index 333caa4d3d79b8432db347bec840ba0010554e34..ec29716eea164cf0468c3e4219e78632e6f2d870 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -88,6 +88,9 @@ CVS code -
 	  make some of them more consistent. (David Benbennick and DLR)
 	- Change some functions to take const char*'s instead of char*'s
 	  where possible. (David Benbennick)
+	- Tweak some #ifdefs to avoid warnings when compiling with
+	  --disable-wrapping, --disable-justify, or a combination of the
+	  two. (DLR)
 - files.c:
   get_next_filename()
 	- Tweak for efficiency, and add the ".save" suffix to the file
diff --git a/src/nano.c b/src/nano.c
index 179eb8d37fb8364d1ca4451e27a4478d8cceaab3..16cdd427b1fc138ee24606fc5fec05ac29e3064d 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -3003,7 +3003,9 @@ int main(int argc, char *argv[])
 {
     int optchr;
     int startline = 0;		/* Line to try and start at */
+#ifndef DISABLE_WRAPJUSTIFY
     bool fill_flag_used = FALSE;	/* Was the fill option used? */
+#endif
     const shortcut *s;
     bool keyhandled = FALSE;	/* Have we handled the keystroke yet? */
     int kbinput;		/* Input from keyboard */
@@ -3299,7 +3301,7 @@ int main(int argc, char *argv[])
 	    operating_dir = operating_dir_cpy;
 	}
 #endif
-#ifndef DISABLE_WRAPPING
+#ifndef DISABLE_WRAPJUSTIFY
 	if (fill_flag_used)
 	    wrap_at = wrap_at_cpy;
 #endif