OSDN Git Service

pci_id_file_open: move variable inside the #ifndef that uses it
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 25 Jun 2013 04:20:27 +0000 (21:20 -0700)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 25 Jun 2013 04:20:27 +0000 (21:20 -0700)
Clears up gcc warning on Solaris:
common_device_name.c: In function 'pci_id_file_open':
common_device_name.c:83:17: warning: unused variable 'result' [-Wunused-variable]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
src/common_device_name.c

index 8c73dbd..a990ac8 100644 (file)
@@ -80,9 +80,9 @@ typedef FILE * pci_id_file;
 static pci_id_file
 pci_id_file_open(void)
 {
+#ifndef __sun
     pci_id_file result;
 
-#ifndef __sun
     result = fopen(PCIIDS_PATH "/pci.ids", "re");
     if (result)
         return result;