Mercurial > ecos
changeset 2047:f1b03c38f955
* tests/crc_test.c: casts to make it gcc 4.0.1 frendly.
| author | asl |
|---|---|
| date | Wed, 03 Aug 2005 20:46:59 +0000 |
| parents | fa70ef591baf |
| children | bc6ddf9b93b5 |
| files | packages/services/crc/current/ChangeLog packages/services/crc/current/tests/crc_test.c |
| diffstat | 2 files changed, 20 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/services/crc/current/ChangeLog +++ b/packages/services/crc/current/ChangeLog @@ -1,3 +1,7 @@ +2005-08-03 Andrew Lunn <andrew.lunn@ascom.ch> + + * tests/crc_test.c: casts to make it gcc 4.0.1 frendly. + 2003-11-21 Andrew Lunn <andrew.lunn@ascom.ch> * tests/crc_test.c: Made the test text gcc 3.3.2 friendly. It does
--- a/packages/services/crc/current/tests/crc_test.c +++ b/packages/services/crc/current/tests/crc_test.c @@ -79,13 +79,15 @@ cyg_start( void ) CYG_TEST_INFO("Calculating CRCs"); - if (1500790746UL != cyg_posix_crc32(license_txt,sizeof(license_txt)-1)) { + if (1500790746UL != cyg_posix_crc32((unsigned char *)license_txt, + sizeof(license_txt)-1)) { CYG_TEST_FAIL("Wrong POSIX CRC32 calculation"); } else { CYG_TEST_PASS("POSIX CRC32 calculation"); } - if (1667500021UL != cyg_ether_crc32(license_txt,sizeof(license_txt)-1)) { + if (1667500021UL != cyg_ether_crc32((unsigned char *)license_txt, + sizeof(license_txt)-1)) { CYG_TEST_FAIL("Wrong Ethernet crc32 calculation"); } else { CYG_TEST_PASS("Ethernet crc32 calculation"); @@ -94,8 +96,10 @@ cyg_start( void ) if (0 != cyg_ether_crc32_accumulate(0,0,0)) { CYG_TEST_FAIL("Ethernet crc32 accumulate setup"); } else { - crc1= cyg_ether_crc32_accumulate(0, license_txt,sizeof(license_txt)-1); - crc2 = cyg_ether_crc32_accumulate(crc1, license_txt,sizeof(license_txt)-1); + crc1= cyg_ether_crc32_accumulate(0, (unsigned char *)license_txt, + sizeof(license_txt)-1); + crc2 = cyg_ether_crc32_accumulate(crc1, (unsigned char *)license_txt, + sizeof(license_txt)-1); if ((1667500021UL != crc1) || (3478736840UL != crc2)) { CYG_TEST_FAIL("Wrong Etheret crc32 accumulate"); @@ -104,14 +108,17 @@ cyg_start( void ) } } - if (1247800780UL != cyg_crc32(license_txt,sizeof(license_txt)-1)) { + if (1247800780UL != cyg_crc32((unsigned char *)license_txt, + sizeof(license_txt)-1)) { CYG_TEST_FAIL("Wrong Gary S. Browns' crc32 calculation"); } else { CYG_TEST_PASS("Gary S. Browns' crc32 calculation"); } - crc1 = cyg_crc32_accumulate(0,license_txt,sizeof(license_txt)-1); - crc2 = cyg_crc32_accumulate(crc1,license_txt,sizeof(license_txt)-1); + crc1 = cyg_crc32_accumulate(0,(unsigned char *)license_txt, + sizeof(license_txt)-1); + crc2 = cyg_crc32_accumulate(crc1,(unsigned char *)license_txt, + sizeof(license_txt)-1); if ((1247800780UL != crc1) || (926002294UL != crc2)) { CYG_TEST_FAIL("Wrong Gary S. Browns' crc32 accumulate calculation"); @@ -119,12 +126,10 @@ cyg_start( void ) CYG_TEST_PASS("Gary S. Browns' crc32 accumulate calculation"); } - if (32256UL != cyg_crc16(license_txt,sizeof(license_txt)-1)) { + if (32256UL != cyg_crc16((unsigned char *)license_txt, + sizeof(license_txt)-1)) { CYG_TEST_FAIL_FINISH("Wrong 16bit CRC calculation"); } else { CYG_TEST_PASS_FINISH("16bit CRC calculation"); } } - - -
