aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/cyg_crc32.c
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-04-09 10:43:07 +0200
committerRafał Miłecki <rafal@milecki.pl>2021-04-09 11:05:54 +0200
commit69e9138080ae39236de48561cf8923a86104eb35 (patch)
treead605c6a312bcfd159bc6256fe17839826228919 /tools/firmware-utils/src/cyg_crc32.c
parent052a30d65e90ac9b3359f4a23aa3024d102c178c (diff)
downloadupstream-69e9138080ae39236de48561cf8923a86104eb35.tar.gz
upstream-69e9138080ae39236de48561cf8923a86104eb35.tar.bz2
upstream-69e9138080ae39236de48561cf8923a86104eb35.zip
firmware-utils: fix -Wpointer-sign warnings
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'tools/firmware-utils/src/cyg_crc32.c')
-rw-r--r--tools/firmware-utils/src/cyg_crc32.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/firmware-utils/src/cyg_crc32.c b/tools/firmware-utils/src/cyg_crc32.c
index 9462598ae6..f13221e946 100644
--- a/tools/firmware-utils/src/cyg_crc32.c
+++ b/tools/firmware-utils/src/cyg_crc32.c
@@ -127,8 +127,9 @@ static const cyg_uint32 crc32_tab[] = {
/* This is the standard Gary S. Brown's 32 bit CRC algorithm, but
accumulate the CRC into the result of a previous CRC. */
cyg_uint32
-cyg_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
+cyg_crc32_accumulate(cyg_uint32 crc32val, void *ptr, int len)
{
+ unsigned char *s = ptr;
int i;
for (i = 0; i < len; i++) {
@@ -139,7 +140,7 @@ cyg_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
/* This is the standard Gary S. Brown's 32 bit CRC algorithm */
cyg_uint32
-cyg_crc32(unsigned char *s, int len)
+cyg_crc32(void *s, int len)
{
return (cyg_crc32_accumulate(0,s,len));
}
@@ -148,8 +149,9 @@ cyg_crc32(unsigned char *s, int len)
result from a previous CRC calculation. This uses the Ethernet FCS
algorithm.*/
cyg_uint32
-cyg_ether_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
+cyg_ether_crc32_accumulate(cyg_uint32 crc32val, void *ptr, int len)
{
+ unsigned char *s = ptr;
int i;
if (s == 0) return 0L;
@@ -164,7 +166,7 @@ cyg_ether_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
/* Return a 32-bit CRC of the contents of the buffer, using the
Ethernet FCS algorithm. */
cyg_uint32
-cyg_ether_crc32(unsigned char *s, int len)
+cyg_ether_crc32(void *s, int len)
{
return cyg_ether_crc32_accumulate(0,s,len);
}