Browse Source

bprint-test: avoid z modifier, mingw fails with it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
4bfee465e9
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      libavutil/bprint.c

+ 7
- 7
libavutil/bprint.c View File

@@ -191,36 +191,36 @@ int main(void)


av_bprint_init(&b, 0, -1); av_bprint_init(&b, 0, -1);
bprint_pascal(&b, 5); bprint_pascal(&b, 5);
printf("Short text in unlimited buffer: %zu/%u\n", strlen(b.str), b.len);
printf("Short text in unlimited buffer: %u/%u\n", (unsigned)strlen(b.str), b.len);
printf("%s\n", b.str); printf("%s\n", b.str);
av_bprint_finalize(&b, NULL); av_bprint_finalize(&b, NULL);


av_bprint_init(&b, 0, -1); av_bprint_init(&b, 0, -1);
bprint_pascal(&b, 25); bprint_pascal(&b, 25);
printf("Long text in unlimited buffer: %zu/%u\n", strlen(b.str), b.len);
printf("Long text in unlimited buffer: %u/%u\n", (unsigned)strlen(b.str), b.len);
av_bprint_finalize(&b, NULL); av_bprint_finalize(&b, NULL);


av_bprint_init(&b, 0, 2048); av_bprint_init(&b, 0, 2048);
bprint_pascal(&b, 25); bprint_pascal(&b, 25);
printf("Long text in limited buffer: %zu/%u\n", strlen(b.str), b.len);
printf("Long text in limited buffer: %u/%u\n", (unsigned)strlen(b.str), b.len);
av_bprint_finalize(&b, NULL); av_bprint_finalize(&b, NULL);


av_bprint_init(&b, 0, 1); av_bprint_init(&b, 0, 1);
bprint_pascal(&b, 5); bprint_pascal(&b, 5);
printf("Short text in automatic buffer: %zu/%u\n", strlen(b.str), b.len);
printf("Short text in automatic buffer: %u/%u\n", (unsigned)strlen(b.str), b.len);


av_bprint_init(&b, 0, 1); av_bprint_init(&b, 0, 1);
bprint_pascal(&b, 25); bprint_pascal(&b, 25);
printf("Long text in automatic buffer: %zu/%u\n", strlen(b.str)/8*8, b.len);
printf("Long text in automatic buffer: %u/%u\n", (unsigned)strlen(b.str)/8*8, b.len);
/* Note that the size of the automatic buffer is arch-dependant. */ /* Note that the size of the automatic buffer is arch-dependant. */


av_bprint_init(&b, 0, 0); av_bprint_init(&b, 0, 0);
bprint_pascal(&b, 25); bprint_pascal(&b, 25);
printf("Long text count only buffer: %zu/%u\n", strlen(b.str), b.len);
printf("Long text count only buffer: %u/%u\n", (unsigned)strlen(b.str), b.len);


av_bprint_init_for_buffer(&b, buf, sizeof(buf)); av_bprint_init_for_buffer(&b, buf, sizeof(buf));
bprint_pascal(&b, 25); bprint_pascal(&b, 25);
printf("Long text count only buffer: %zu/%u\n", strlen(buf), b.len);
printf("Long text count only buffer: %u/%u\n", (unsigned)strlen(buf), b.len);


return 0; return 0;
} }


Loading…
Cancel
Save