#! /bin/sh /usr/share/dpatch/dpatch-run
## 07_unused_variables.dpatch by Colin Watson <cjwatson@ubuntu.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: GCC 4.6 warns about unused variables, and fileschanged builds with
## DP: -Werror, so deal with unused variable warnings.

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' fileschanged-0.6.5~/src/filelist.c fileschanged-0.6.5/src/filelist.c
--- fileschanged-0.6.5~/src/filelist.c	2006-04-19 20:42:28.000000000 +0100
+++ fileschanged-0.6.5/src/filelist.c	2011-09-14 01:17:40.000000000 +0100
@@ -40,10 +40,9 @@
 on_the_command_line (int (*process_file)(void *list, char *filename), void *list)
 {
   unsigned int i;
-  int retval;
   for(i = 0; i < arguments.arraylen; i++)
     {
-      retval = process_file (list, arguments.args[i]);
+      process_file (list, arguments.args[i]);
     }
   return 0;
 }
@@ -66,7 +65,6 @@
   char *filename;
   char *line = NULL;
   size_t n = 0;
-  int retval;
   filename = arguments.fileschanged.filelist_filename;
   if (strcmp (filename, "-") == 0)
     fileptr = stdin;
@@ -80,7 +78,7 @@
     {
       chop (line);
       if (line[0] != '#')
-	retval = process_file (list, line);
+	process_file (list, line);
       free (line); line = NULL;
       n = 0;
     }
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' fileschanged-0.6.5~/src/monitor.c fileschanged-0.6.5/src/monitor.c
--- fileschanged-0.6.5~/src/monitor.c	2006-04-19 20:42:29.000000000 +0100
+++ fileschanged-0.6.5/src/monitor.c	2011-09-14 01:17:23.000000000 +0100
@@ -84,6 +84,7 @@
 	  retval = FAMMonitorDirectory (c, node->filename, &node->request,
 					(void *) node);
 	  //printf ("FAMMonitorDirectory returns %d (reqnum %d)\n", retval, node->request.reqnum);
+	  (void) retval;
 	}
       else if (S_ISREG (node->statbuf.st_mode))
 	{
@@ -91,6 +92,7 @@
 	  retval = FAMMonitorFile (c, node->filename, &node->request,
 				   (void *) node);
 	  //printf ("FAMMonitorFile returns %d (reqnum %d)\n", retval, node->request.reqnum);
+	  (void) retval;
 	}
       monitor_handle_events (c, list, 0, 30);
     }
