Fix types of some pointers in char_strings unit test
The tests still passed, but with warnings during compilation.
This commit is contained in:
parent
82ae30722f
commit
f864fa0381
1 changed files with 2 additions and 2 deletions
|
|
@ -179,7 +179,7 @@ int main() {
|
||||||
// char *& tests
|
// char *& tests
|
||||||
|
|
||||||
for (i=0; i<count; i++) {
|
for (i=0; i<count; i++) {
|
||||||
char **str = GetConstCharPointerRef();
|
const char **str = GetConstCharPointerRef();
|
||||||
if (strcmp(*str, CPLUSPLUS_MSG) != 0) {
|
if (strcmp(*str, CPLUSPLUS_MSG) != 0) {
|
||||||
fprintf(stderr, "Test char pointer ref get failed, iteration %d\n",i);
|
fprintf(stderr, "Test char pointer ref get failed, iteration %d\n",i);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -189,7 +189,7 @@ int main() {
|
||||||
for (i=0; i<count; i++) {
|
for (i=0; i<count; i++) {
|
||||||
char *str = (char*) malloc(sizeof(char) * 256);
|
char *str = (char*) malloc(sizeof(char) * 256);
|
||||||
sprintf(str, "%s%d", OTHERLAND_MSG, i);
|
sprintf(str, "%s%d", OTHERLAND_MSG, i);
|
||||||
if (!SetConstCharPointerRef((char **) &str, i)) {
|
if (!SetConstCharPointerRef((const char **)&str, i)) {
|
||||||
fprintf(stderr, "Test char pointer ref set failed, iteration %d\n", i);
|
fprintf(stderr, "Test char pointer ref set failed, iteration %d\n", i);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue