oops, type safety issue resolved
authorJean-Marc Valin <Jean-Marc.Valin@csiro.au>
Thu, 31 Jan 2008 23:45:45 +0000 (10:45 +1100)
committerJean-Marc Valin <Jean-Marc.Valin@csiro.au>
Thu, 31 Jan 2008 23:45:45 +0000 (10:45 +1100)
libcelt/header.c

index 636f378..a0f30f6 100644 (file)
@@ -62,13 +62,13 @@ int celt_header_to_packet(const CELTHeader *header, unsigned char *packet, celt_
 {
    CELT_MEMSET(packet, 0, sizeof(*header));
    /* FIXME: Do it in a endian-safe, alignment-safe, overflow-safe manner */
-   CELT_COPY(packet, (char*)header, sizeof(*header));
+   CELT_COPY(packet, (unsigned char*)header, sizeof(*header));
    return sizeof(*header);
 }
 
 int celt_header_from_packet(const unsigned char *packet, celt_uint32_t size, CELTHeader *header)
 {
-   CELT_COPY((char*)header, packet, sizeof(*header));
+   CELT_COPY((unsigned char*)header, packet, sizeof(*header));
    return sizeof(*header);
 }