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) \
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to