From 017281da2443fa8a4ff7db455f0a79fde37d4d68 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 7 Jul 2011 08:22:43 -0300 Subject: Bug#12727287: Maintainer mode compilation fails with gcc 4.6 GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled by -Wall, that causes GCC to emit a warning whenever a local variable is assigned to, but otherwise unused (aside from its declaration). Since the maintainer mode uses -Wall and -Werror, source code which triggers these warnings will be rejected. That is, these warnings become hard errors. The solution is to fix the code which triggers these specific warnings. In most of the cases, this is a welcome cleanup as code which triggers this warning is probably dead anyway. --- dbug/dbug.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'dbug') diff --git a/dbug/dbug.c b/dbug/dbug.c index 2c06eeff95a..2dadf7bb2d5 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -1873,7 +1873,6 @@ static void DBUGOpenFile(CODE_STATE *cs, const char *name,const char *end,int append) { REGISTER FILE *fp; - REGISTER BOOLEAN newfile; if (name != NULL) { @@ -1902,7 +1901,6 @@ static void DBUGOpenFile(CODE_STATE *cs, } else { - newfile= !EXISTS(name); if (!(fp= fopen(name, append ? "a+" : "w"))) { (void) fprintf(stderr, ERR_OPEN, cs->process, name); -- cgit v1.2.1