From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:45:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D5F8106564A; Sun, 16 Oct 2011 08:45:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DAAB8FC16; Sun, 16 Oct 2011 08:45:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8jGex053519; Sun, 16 Oct 2011 08:45:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8jG3K053517; Sun, 16 Oct 2011 08:45:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160845.p9G8jG3K053517@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226426 - head/lib/libsdp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:45:16 -0000 Author: ed Date: Sun Oct 16 08:45:16 2011 New Revision: 226426 URL: http://svn.freebsd.org/changeset/base/226426 Log: Change the SDP_GET* macros to cast to a const buffer. This fixes a compiler warning when passing a const buffer to them. Modified: head/lib/libsdp/sdp.h Modified: head/lib/libsdp/sdp.h ============================================================================== --- head/lib/libsdp/sdp.h Sun Oct 16 08:44:03 2011 (r226425) +++ head/lib/libsdp/sdp.h Sun Oct 16 08:45:16 2011 (r226426) @@ -312,13 +312,13 @@ typedef struct sdp_attr * sdp_attr_p; /* Inline versions of get/put byte/short/long. Pointer is advanced */ #define SDP_GET8(b, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (b) = *t_cp; \ (cp) ++; \ } #define SDP_GET16(s, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (s) = ((uint16_t)t_cp[0] << 8) \ | ((uint16_t)t_cp[1]) \ ; \ @@ -326,7 +326,7 @@ typedef struct sdp_attr * sdp_attr_p; } #define SDP_GET32(l, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (l) = ((uint32_t)t_cp[0] << 24) \ | ((uint32_t)t_cp[1] << 16) \ | ((uint32_t)t_cp[2] << 8) \