summaryrefslogtreecommitdiffstats
path: root/src/crc.c
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-23 09:10:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-23 09:10:35 +0200
commit606e22abcf8b9f3c3d63ccc8ccf8ae4020c6ffd3 (patch)
treee067c99ea946ba4877e12e3939c7fe6433d94f6f /src/crc.c
parent262a43fc5dcc04731a8951ee44555f582f7e8106 (diff)
downloaddabmux-606e22abcf8b9f3c3d63ccc8ccf8ae4020c6ffd3.tar.gz
dabmux-606e22abcf8b9f3c3d63ccc8ccf8ae4020c6ffd3.tar.bz2
dabmux-606e22abcf8b9f3c3d63ccc8ccf8ae4020c6ffd3.zip
Enable and take care of some warnings
Diffstat (limited to 'src/crc.c')
-rw-r--r--src/crc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crc.c b/src/crc.c
index 2a676d9..cc02473 100644
--- a/src/crc.c
+++ b/src/crc.c
@@ -236,7 +236,7 @@ void init_crc32tab(uint32_t l_code, uint32_t l_init)
uint8_t crc8(uint8_t l_crc, const void *lp_data, unsigned l_nb)
{
- uint8_t* data = (uint8_t*)lp_data;
+ const uint8_t* data = (const uint8_t*)lp_data;
while (l_nb--) {
l_crc = crc8tab[l_crc ^ *(data++)];
}
@@ -246,7 +246,7 @@ uint8_t crc8(uint8_t l_crc, const void *lp_data, unsigned l_nb)
uint16_t crc16(uint16_t l_crc, const void *lp_data, unsigned l_nb)
{
- uint8_t* data = (uint8_t*)lp_data;
+ const uint8_t* data = (const uint8_t*)lp_data;
while (l_nb--) {
l_crc =
(l_crc << 8) ^ crc16tab[(l_crc >> 8) ^ *(data++)];
@@ -257,7 +257,7 @@ uint16_t crc16(uint16_t l_crc, const void *lp_data, unsigned l_nb)
uint32_t crc32(uint32_t l_crc, const void *lp_data, unsigned l_nb)
{
- uint8_t* data = (uint8_t*)lp_data;
+ const uint8_t* data = (const uint8_t*)lp_data;
while (l_nb--) {
l_crc =
(l_crc << 8) ^ crc32tab[((l_crc >> 24) ^ *(data++)) & 0xff];