Index: current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/services/crc/current/ChangeLog,v retrieving revision 1.7 diff -u -r1.7 ChangeLog --- current/ChangeLog 21 Nov 2003 12:01:25 -0000 1.7 +++ current/ChangeLog 3 Aug 2005 20:46:49 -0000 @@ -1,3 +1,7 @@ +2005-08-03 Andrew Lunn + + * tests/crc_test.c: casts to make it gcc 4.0.1 frendly. + 2003-11-21 Andrew Lunn * tests/crc_test.c: Made the test text gcc 3.3.2 friendly. It does Index: current/tests/crc_test.c =================================================================== RCS file: /cvs/ecos/ecos/packages/services/crc/current/tests/crc_test.c,v retrieving revision 1.4 diff -u -r1.4 crc_test.c --- current/tests/crc_test.c 21 Nov 2003 12:01:25 -0000 1.4 +++ current/tests/crc_test.c 3 Aug 2005 20:46:49 -0000 @@ -79,13 +79,15 @@ 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 @@ 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 @@ } } - 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_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"); } } - - -