[PATCH:libpciaccess 2/2] pci_id_file_open: move variable inside the #ifndef that uses it

Alan Coopersmith alan.coopersmith at oracle.com
Mon Jun 24 21:22:05 PDT 2013


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 at oracle.com>
---
 src/common_device_name.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common_device_name.c b/src/common_device_name.c
index 8c73dbd..a990ac8 100644
--- a/src/common_device_name.c
+++ b/src/common_device_name.c
@@ -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;
-- 
1.7.9.2



More information about the xorg-devel mailing list