Package: xdiskusage / 1.48-10.1

10_fix_ftbfs_with_gcc_4.7.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: avoid redeclared variable names in nested scopes (FTBFS with gcc 4.7)
Origin: vendor
Bug-Debian: http://bugs.debian.org/667419
Forwarded: no
Author: Cyril Brulebois <kibi@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-05-27

--- a/xdiskusage.C
+++ b/xdiskusage.C
@@ -405,8 +405,8 @@ OutputWindow* OutputWindow::make(const c
       strncpy(pathbuf, path, 1024);
       for (int i=0; i<10; i++) {
 	char *p = (char*)fl_filename_name(pathbuf);
-	int i = readlink(pathbuf, p, 1024-(p-pathbuf));
-	if (i < 0) {
+	int r = readlink(pathbuf, p, 1024-(p-pathbuf));
+	if (r < 0) {
 	  if (errno != EINVAL) {
 	    strcat(pathbuf, ": no such file");
 	    fl_alert(pathbuf);
@@ -414,8 +414,8 @@ OutputWindow* OutputWindow::make(const c
 	  }
 	  break;
 	}
-	if (*p == '/') {memmove(pathbuf, p, i); p = pathbuf;}
-	p[i] = 0;
+	if (*p == '/') {memmove(pathbuf, p, r); p = pathbuf;}
+	p[r] = 0;
 	path = pathbuf;
       }
     }