Subject: Re: Build failure - port-i386 in src/sys/dev/pci/amdpm_smbus.c
To: None <current-users@netbsd.org>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 02/06/2007 05:53:02
On Tue, 6 Feb 2007, Paul Goyette wrote:

>> /usr/src/sys/dev/pci/amdpm_smbus.c: In function 'amdpm_smbus_attach':
>> /usr/src/sys/dev/pci/amdpm_smbus.c:82: warning: unused variable 'intrstr'
>> /usr/src/sys/dev/pci/amdpm_smbus.c:81: warning: unused variable 'ih'
>
> Got the same error while building port-amd64 GENERIC_ACPI and GENERIC.MP 
> kernels, so it's probably not port-specific.

These two variables appear to be used only inside the the #ifdef XBOX 
block, so the following patch seems to be in order here...

Index: amdpm_smbus.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/amdpm_smbus.c,v
retrieving revision 1.11
diff -u -p -r1.11 amdpm_smbus.c
--- amdpm_smbus.c       6 Feb 2007 02:07:36 -0000       1.11
+++ amdpm_smbus.c       6 Feb 2007 13:51:20 -0000
@@ -78,8 +78,10 @@ void
  amdpm_smbus_attach(struct amdpm_softc *sc)
  {
          struct i2cbus_attach_args iba;
+#ifdef XBOX
         pci_intr_handle_t ih;
         const char *intrstr;
+#endif

         /* register with iic */
         sc->sc_i2c.ic_cookie = sc;



----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
|                  | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------