[IA64] aliasing-test: fix gcc warnings on non-ia64

Eliminate all build warnings. OK, these build warnings are from
a build on x86_64. When I build on ia64, I don't see warnings.

Now builds cleanly on ia64 and x86_64.

Documentation/ia64/aliasing-test.c: In function 'map_mem':
Documentation/ia64/aliasing-test.c:39: warning: implicit declaration of function 'ioctl'
Documentation/ia64/aliasing-test.c: In function 'scan_rom':
Documentation/ia64/aliasing-test.c:183: warning: format '%ld' expects type 'long int', but argument 4 has type 'int'
Documentation/ia64/aliasing-test.c: At top level:
Documentation/ia64/aliasing-test.c:208: warning: function declaration isn't a prototype
Documentation/ia64/aliasing-test.c: In function 'main':
Documentation/ia64/aliasing-test.c:259: warning: control reaches end of non-void function
Documentation/ia64/aliasing-test.c: In function 'scan_rom':
Documentation/ia64/aliasing-test.c:152: warning: 'rc' may be used uninitialized in this function
Documentation/ia64/aliasing-test.c: In function 'scan_tree':
Documentation/ia64/aliasing-test.c:68: warning: 'rc' may be used uninitialized in this function

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by Randy Dunlap and committed by Tony Luck cdef24c9 5302ac50

+9 -6
+9 -6
Documentation/ia64/aliasing-test.c
··· 16 16 #include <fcntl.h> 17 17 #include <fnmatch.h> 18 18 #include <string.h> 19 + #include <sys/ioctl.h> 19 20 #include <sys/mman.h> 20 21 #include <sys/stat.h> 21 22 #include <unistd.h> ··· 66 65 { 67 66 struct dirent **namelist; 68 67 char *name, *path2; 69 - int i, n, r, rc, result = 0; 68 + int i, n, r, rc = 0, result = 0; 70 69 struct stat buf; 71 70 72 71 n = scandir(path, &namelist, 0, alphasort); ··· 114 113 free(namelist[i]); 115 114 } 116 115 free(namelist); 117 - return rc; 116 + return result; 118 117 } 119 118 120 119 char buf[1024]; ··· 150 149 { 151 150 struct dirent **namelist; 152 151 char *name, *path2; 153 - int i, n, r, rc, result = 0; 152 + int i, n, r, rc = 0, result = 0; 154 153 struct stat buf; 155 154 156 155 n = scandir(path, &namelist, 0, alphasort); ··· 181 180 * important thing is that no MCA happened. 182 181 */ 183 182 if (rc > 0) 184 - fprintf(stderr, "PASS: %s read %ld bytes\n", path2, rc); 183 + fprintf(stderr, "PASS: %s read %d bytes\n", path2, rc); 185 184 else { 186 185 fprintf(stderr, "PASS: %s not readable\n", path2); 187 186 return rc; ··· 202 201 free(namelist[i]); 203 202 } 204 203 free(namelist); 205 - return rc; 204 + return result; 206 205 } 207 206 208 - int main() 207 + int main(void) 209 208 { 210 209 int rc; 211 210 ··· 257 256 scan_tree("/proc/bus/pci", "??.?", 0xA0000, 0x20000, 0); 258 257 scan_tree("/proc/bus/pci", "??.?", 0xC0000, 0x40000, 1); 259 258 scan_tree("/proc/bus/pci", "??.?", 0, 1024*1024, 0); 259 + 260 + return rc; 260 261 }