Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
On Mon, 3 Dec 2007, Tom Spindler wrote:
> Looks like no le arches may have used the bluetooth code until now -
> because I'm now getting
>
> /home/dogcow/work/nbsrc/sys/dev/bluetooth/bcsp.c:1477: warning: 'i' may be
> used uninitialized in this function
>
> Which does seem to be a very valid complaint; line 1505 is the offending bit:
> if (m->m_len != sizeof(uint32_t) || pkt[i].type == NULL) {
>
> should this be pkt[0].type = NULL ?
I'm not so sure.. This belongs to kiyohara@ and it only just got added to
i386/GENERIC.
I'm not sure why but that compiles ok on my system. The intention seems to
be to fail if the packet length was not exactly right, nor the type found
in the list.
probably this will let it build?
--- /usr/src/sys/dev/bluetooth/bcsp.c 2007-11-28 20:16:18.000000000 +0000
+++ bcsp.c 2007-12-03 09:43:33.000000000 +0000
@@ -1496,6 +1496,7 @@
#endif
rcvpkt = mtod(m, uint32_t *);
+ i = 0;
/* length of le packets is 4 */
if (m->m_len == sizeof(uint32_t))
iain
Home |
Main Index |
Thread Index |
Old Index