diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-04-23 09:10:35 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-04-23 09:10:35 +0200 |
commit | 606e22abcf8b9f3c3d63ccc8ccf8ae4020c6ffd3 (patch) | |
tree | e067c99ea946ba4877e12e3939c7fe6433d94f6f /src/crc.c | |
parent | 262a43fc5dcc04731a8951ee44555f582f7e8106 (diff) | |
download | dabmux-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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]; |