Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libbluetooth quell some lint warnings



details:   https://anonhg.NetBSD.org/src/rev/8e915b4b80b6
branches:  trunk
changeset: 758714:8e915b4b80b6
user:      plunky <plunky%NetBSD.org@localhost>
date:      Sat Nov 13 19:43:56 2010 +0000

description:
quell some lint warnings

diffstat:

 lib/libbluetooth/bt_dev.c      |   5 +++--
 lib/libbluetooth/sdp_put.c     |   8 ++++----
 lib/libbluetooth/sdp_service.c |  10 +++++-----
 lib/libbluetooth/sdp_session.c |   8 ++++----
 4 files changed, 16 insertions(+), 15 deletions(-)

diffs (143 lines):

diff -r 5712c959c786 -r 8e915b4b80b6 lib/libbluetooth/bt_dev.c
--- a/lib/libbluetooth/bt_dev.c Sat Nov 13 19:41:32 2010 +0000
+++ b/lib/libbluetooth/bt_dev.c Sat Nov 13 19:43:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bt_dev.c,v 1.1 2009/08/03 15:59:42 plunky Exp $        */
+/*     $NetBSD: bt_dev.c,v 1.2 2010/11/13 19:43:56 plunky Exp $        */
 
 /*-
  * Copyright (c) 2009 Iain Hibbert
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_dev.c,v 1.1 2009/08/03 15:59:42 plunky Exp $");
+__RCSID("$NetBSD: bt_dev.c,v 1.2 2010/11/13 19:43:56 plunky Exp $");
 
 #include <sys/event.h>
 #include <sys/ioctl.h>
@@ -515,6 +515,7 @@
  * Internal function used by bt_devinquiry to find the first
  * active device.
  */
+/* ARGSUSED */
 static int
 bt__devany_cb(int s, const struct bt_devinfo *info, void *arg)
 {
diff -r 5712c959c786 -r 8e915b4b80b6 lib/libbluetooth/sdp_put.c
--- a/lib/libbluetooth/sdp_put.c        Sat Nov 13 19:41:32 2010 +0000
+++ b/lib/libbluetooth/sdp_put.c        Sat Nov 13 19:43:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdp_put.c,v 1.2 2009/05/14 19:12:45 plunky Exp $       */
+/*     $NetBSD: sdp_put.c,v 1.3 2010/11/13 19:43:56 plunky Exp $       */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sdp_put.c,v 1.2 2009/05/14 19:12:45 plunky Exp $");
+__RCSID("$NetBSD: sdp_put.c,v 1.3 2010/11/13 19:43:56 plunky Exp $");
 
 #include <bluetooth.h>
 #include <limits.h>
@@ -354,7 +354,7 @@
        if (!_sdp_put_ext(SDP_DATA_STR, data, len))
                return false;
 
-       memcpy(data->next, str, len);
+       memcpy(data->next, str, (size_t)len);
        data->next += len;
        return true;
 }
@@ -369,7 +369,7 @@
        if (!_sdp_put_ext(SDP_DATA_URL, data, len))
                return false;
 
-       memcpy(data->next, url, len);
+       memcpy(data->next, url, (size_t)len);
        data->next += len;
        return true;
 }
diff -r 5712c959c786 -r 8e915b4b80b6 lib/libbluetooth/sdp_service.c
--- a/lib/libbluetooth/sdp_service.c    Sat Nov 13 19:41:32 2010 +0000
+++ b/lib/libbluetooth/sdp_service.c    Sat Nov 13 19:43:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdp_service.c,v 1.2 2009/05/14 19:12:45 plunky Exp $   */
+/*     $NetBSD: sdp_service.c,v 1.3 2010/11/13 19:43:56 plunky Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sdp_service.c,v 1.2 2009/05/14 19:12:45 plunky Exp $");
+__RCSID("$NetBSD: sdp_service.c,v 1.3 2010/11/13 19:43:56 plunky Exp $");
 
 #include <errno.h>
 #include <limits.h>
@@ -193,7 +193,7 @@
                    || ptr + ptr[0] + 1 != end)
                        break;
 
-               memcpy(ss->cs, ptr, ptr[0] + 1);
+               memcpy(ss->cs, ptr, (size_t)(ptr[0] + 1));
 
                /*
                 * Complete?
@@ -312,7 +312,7 @@
                    || ptr + ptr[0] + 1 != end)
                        break;
 
-               memcpy(ss->cs, ptr, ptr[0] + 1);
+               memcpy(ss->cs, ptr, (size_t)(ptr[0] + 1));
 
                /*
                 * Complete?
@@ -448,7 +448,7 @@
                    || ptr + ptr[0] + 1 != end)
                        break;
 
-               memcpy(ss->cs, ptr, ptr[0] + 1);
+               memcpy(ss->cs, ptr, (size_t)(ptr[0] + 1));
 
                /*
                 * Complete?
diff -r 5712c959c786 -r 8e915b4b80b6 lib/libbluetooth/sdp_session.c
--- a/lib/libbluetooth/sdp_session.c    Sat Nov 13 19:41:32 2010 +0000
+++ b/lib/libbluetooth/sdp_session.c    Sat Nov 13 19:43:56 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdp_session.c,v 1.2 2009/05/14 19:12:45 plunky Exp $   */
+/*     $NetBSD: sdp_session.c,v 1.3 2010/11/13 19:43:56 plunky Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: sdp_session.c,v 1.2 2009/05/14 19:12:45 plunky Exp $");
+__RCSID("$NetBSD: sdp_session.c,v 1.3 2010/11/13 19:43:56 plunky Exp $");
 
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -87,7 +87,7 @@
        if (getsockopt(ss->s, BTPROTO_L2CAP, SO_L2CAP_IMTU, &ss->imtu, &len) == -1)
                goto fail;
 
-       ss->ibuf = malloc(ss->imtu);
+       ss->ibuf = malloc((size_t)(ss->imtu));
        if (ss->ibuf == NULL)
                goto fail;
 
@@ -127,7 +127,7 @@
 
        ss->imtu = L2CAP_MTU_DEFAULT;
 
-       ss->ibuf = malloc(ss->imtu);
+       ss->ibuf = malloc((size_t)(ss->imtu));
        if (ss->ibuf == NULL)
                goto fail;
 



Home | Main Index | Thread Index | Old Index