summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-06-24 21:20:27 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-06-24 21:20:27 -0700
commit7f388e466bd7fbb7f9eba531e494e7efbd3a65dc (patch)
treefba82b88b8bbaaeab126cf0ecb62e99a2f0cf690 /src
parenta39f054649e773a4b33bf8f52152f7c5139bb90e (diff)
downloadlibpciaccess-7f388e466bd7fbb7f9eba531e494e7efbd3a65dc.tar.gz
libpciaccess-7f388e466bd7fbb7f9eba531e494e7efbd3a65dc.tar.bz2
libpciaccess-7f388e466bd7fbb7f9eba531e494e7efbd3a65dc.zip
pci_id_file_open: move variable inside the #ifndef that uses it
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>
Diffstat (limited to 'src')
-rw-r--r--src/common_device_name.c2
1 files changed, 1 insertions, 1 deletions
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;