diff options
author | Marcel Raad <raad@teamviewer.com> | 2017-05-05 21:29:50 +0200 |
---|---|---|
committer | Marcel Raad <raad@teamviewer.com> | 2017-05-05 21:29:50 +0200 |
commit | 6dc3422d48b002887ae3a78afdf626f792397c06 (patch) | |
tree | 560021e5413048cdb12c085e0b46ec9bc2512b58 /tests/unit | |
parent | 2b7bde4d3f08f1414fd73cb908d60e53949c33da (diff) | |
download | curl-6dc3422d48b002887ae3a78afdf626f792397c06.tar.gz |
tests: fix -Wcast-qual warnings
Avoid casting string literals to non-const char *.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/curlcheck.h | 7 | ||||
-rw-r--r-- | tests/unit/unit1395.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h index 0660e2bed..46cb84aaf 100644 --- a/tests/unit/curlcheck.h +++ b/tests/unit/curlcheck.h @@ -39,9 +39,10 @@ #define verify_memory(dynamic, check, len) \ if(dynamic && memcmp(dynamic, check, len)) { \ fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n", \ - __FILE__, __LINE__, len, hexdump((unsigned char *)check, len)); \ - fprintf(stderr, "%s:%d the same as '%s'\n", \ - __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len)); \ + __FILE__, __LINE__, len, \ + hexdump((const unsigned char *)check, len)); \ + fprintf(stderr, "%s:%d the same as '%s'\n", __FILE__, __LINE__, \ + hexdump((const unsigned char *)dynamic, len)); \ unitfail++; \ } diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c index 13f464134..ba8e14f45 100644 --- a/tests/unit/unit1395.c +++ b/tests/unit/unit1395.c @@ -68,7 +68,7 @@ UNITTEST_START }; for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) { - char *out = Curl_dedotdotify((char *)pairs[i].input); + char *out = Curl_dedotdotify(pairs[i].input); abort_unless(out != NULL, "returned NULL!"); if(strcmp(out, pairs[i].output)) { |