static int add_pool(struct pool *pool, unsigned int alloc_size)
{
- int fd, bitmap_blocks, ret;
+ int fd, bitmap_blocks;
char file[] = "/tmp/.fio_smalloc.XXXXXX";
void *ptr;
pool->free_blocks = bitmap_blocks * SMALLOC_BPB;
#ifdef FIO_HAVE_FALLOCATE
- ret = posix_fallocate(fd, 0, alloc_size);
- if (ret > 0) {
- fprintf(stderr, "posix_fallocate pool file failed: %s\n", strerror(ret));
- goto out_unlink;
+ {
+ int ret;
+
+ ret = posix_fallocate(fd, 0, alloc_size);
+ if (ret > 0) {
+ fprintf(stderr, "posix_fallocate pool file failed: %s\n", strerror(ret));
+ goto out_unlink;
+ }
}
#endif