diff --git a/src/rcfile.c b/src/rcfile.c
index 24ec588e2451968e55b4070e2c2d7e61b9c3160b..bd041691069d54fab52f976afcb5a240bb7b3079 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -723,7 +723,7 @@ void parse_colors(char *ptr, bool icase)
 /* Parse the headers (1st line) of the file which may influence the regex used. */
 void parse_headers(char *ptr)
 {
-    char *h, *regstr;
+    char *regstr;
 
     assert(ptr != NULL);
 
@@ -743,8 +743,6 @@ void parse_headers(char *ptr)
     while (ptr != NULL && *ptr != '\0') {
 	exttype *newheader;
 	    /* The new color structure. */
-	bool cancelled = FALSE;
-	    /* The start expression was bad. */
 
 	if (*ptr != '"') {
 	    rcfile_error(
diff --git a/src/text.c b/src/text.c
index 789d280c97fa6a32d68f624e14b7ac3d60437008..d6dcfbe2d40d9491c4e639b0a882925330147f6d 100644
--- a/src/text.c
+++ b/src/text.c
@@ -549,8 +549,7 @@ void do_redo(void)
 {
     undo *u = openfile->undotop;
     filestruct *f = openfile->current, *t;
-    filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
-    int len = 0, i;
+    int len = 0;
     char *undidmsg, *data;
 
     for (; u != NULL && u->next != openfile->current_undo; u = u->next)
@@ -815,7 +814,7 @@ bool execute_command(const char *command)
 /* Add a new undo struct to the top of the current pile */
 void add_undo(undo_type current_action)
 {
-    undo *u, *cutu;
+    undo *u;
     char *data;
     openfilestruct *fs = openfile;
     static undo *last_cutu = NULL; /* Last thing we cut to set up the undo for uncut */