Mercurial > ecos
changeset 3251:a27026771dae
Fix compiler warnings for discrediting const pointer. [ Bugzilla 1001865 ]
| author | vae |
|---|---|
| date | Sat, 15 Jun 2013 20:28:37 +0000 |
| parents | 283b2c38b413 |
| children | 2dba5f2af421 |
| files | packages/language/c/libc/string/current/ChangeLog packages/language/c/libc/string/current/tests/memchr.c |
| diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/language/c/libc/string/current/ChangeLog +++ b/packages/language/c/libc/string/current/ChangeLog @@ -1,3 +1,8 @@ +2013-06-13 Ilija Kocho <ilijak@siva.com.mk> + + * tests/memchr.c: Fix compiler warnings for discrediting const pointer. + [ Bugzilla 1001865 ] + 2010-05-10 Ross Younger <wry@ecoscentric.com> * include/string.h: Declare strnlen.
--- a/packages/language/c/libc/string/current/tests/memchr.c +++ b/packages/language/c/libc/string/current/tests/memchr.c @@ -75,7 +75,8 @@ void cyg_user_start(void) #endif { char x[] = "Your feeble skills are no match for the power of " - "the dark side!"; + "the dark side!"; + char x0[] = ""; void *ret; CYG_TEST_INIT(); @@ -104,7 +105,7 @@ void cyg_user_start(void) CYG_TEST_PASS_FAIL( ret == NULL, "Boundary test 2" ); // Check 6 (boundary condition) - ret = memchr( (void *)"", (int)'\0', 0 ); + ret = memchr(x0, (int)'\0', 0 ); CYG_TEST_PASS_FAIL( ret == NULL, "Boundary test 3" ); // CYG_TEST_NA("Testing is not applicable to this configuration");
