tags 625330 patch user ubuntu-de...@lists.ubuntu.com usertags 625330 ubuntu-patch oneiric thanks
On Tue, May 03, 2011 at 10:32:46AM +0000, Matthias Klose wrote: > This package builds with -Werror, and GCC 4.6 triggers new warnings > which will make the package fail to build. Currently a Debian patch > just passes > -Wno-error=unused-but-set-variable and > -Wno-error=unused-but-set-parameter > to avoid build failures, but this patch will be reverted with the > GCC 4.6.1 release, and the severity of the report will be raised. > > The full build log can be found at: > http://people.debian.org/~doko/tmp/werror/fileschanged_0.6.5-1.1_lsid64.buildlog > The last lines of the build log are at the end of this report. Patch follows. * Avoid unused variable warnings so they don't cause build failures with -Werror (closes: #625330). diff -u fileschanged-0.6.5/debian/patches/00list fileschanged-0.6.5/debian/patches/00list --- fileschanged-0.6.5/debian/patches/00list +++ fileschanged-0.6.5/debian/patches/00list @@ -5,0 +6 @@ +07_unused_variables.dpatch only in patch2: unchanged: --- fileschanged-0.6.5.orig/debian/patches/07_unused_variables.dpatch +++ fileschanged-0.6.5/debian/patches/07_unused_variables.dpatch @@ -0,0 +1,59 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 07_unused_variables.dpatch by Colin Watson <cjwat...@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); + } Thanks, -- Colin Watson [cjwat...@ubuntu.com] -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org