valgrind is now happy on tbb

This commit is contained in:
tTh 2018-11-16 13:18:30 +01:00
parent d6fde6312f
commit beb6075239
3 changed files with 10 additions and 3 deletions

View File

@ -227,10 +227,12 @@ fprintf(stderr, "*** %s : array at %p, sz %d\n", __func__, ar, bbl->size);
#endif #endif
for (idx=0; idx<bbl->fidx; idx++) { for (idx=0; idx<bbl->fidx; idx++) {
fprintf(fp, "%11.6f %11.6f %11.6f", fprintf(fp, "%12.6f %12.6f %12.6f",
ar[idx].p.x, ar[idx].p.y, ar[idx].p.z); ar[idx].p.x, ar[idx].p.y, ar[idx].p.z);
if (flags & 0x01) fprintf(fp, " %11.6f", ar[idx].d); if (flags & 0x02) fprintf(fp, " %6d", ar[idx].gray); if (flags & 0x01) fprintf(fp, " %12.6f", ar[idx].d);
if (flags & 0x02) fprintf(fp, " %6d", ar[idx].gray);
fputs("\n", fp); fputs("\n", fp);
} }
fflush(fp); fflush(fp);

View File

@ -4,7 +4,7 @@
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
#define LIBBB_VERSION 48 #define LIBBB_VERSION 49
#define SZ_BUBULLE_TEXT 51 /* arbitrary value */ #define SZ_BUBULLE_TEXT 51 /* arbitrary value */

5
tbb.c
View File

@ -106,6 +106,8 @@ printf("peek 3 -> %7d\n", foo);
foo = niceprint_bubulle(&bubulle, 0); foo = niceprint_bubulle(&bubulle, 0);
printf("niceprint -> %7d\n", foo); printf("niceprint -> %7d\n", foo);
free_bubulles(bublist, 0);
return 0; return 0;
} }
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
@ -122,7 +124,10 @@ test_alloc_free(5);
test_push_pop(2000); test_push_pop(2000);
test_cleanfill_my_bublist(999); test_cleanfill_my_bublist(999);
/*
foo = test_peek_poke(5000); foo = test_peek_poke(5000);
fprintf(stderr, "test peek/poke -> %d\n", foo); fprintf(stderr, "test peek/poke -> %d\n", foo);
*/
return 0; return 0;
} }