This apparently causes complaints on cygwin:
CC stat.o
In file included from os/os-windows.h:18:0,
from os/os.h:54,
from thread_options.h:5,
from fio.h:18,
from init.c:19:
init.c: In function ‘add_job’:
os/../log.h:24:12: error: the comparison will always evaluate as ‘true’ for the address of ‘out’ will never be NULL [-Werror=address]
if ((buf) != NULL) \
^
os/../log.h:24:12: note: in definition of macro ‘log_buf’
if ((buf) != NULL) \
which is utterly stupid, but hey...
Signed-off-by: Jens Axboe <axboe@kernel.dk>
struct buf_output out;
buf_output_init(&out);
struct buf_output out;
buf_output_init(&out);
- log_buf(&out, "Starting ");
+ __log_buf(&out, "Starting ");
- log_buf(&out, "%d thread%s", nr_thread,
+ __log_buf(&out, "%d thread%s", nr_thread,
nr_thread > 1 ? "s" : "");
if (nr_process) {
if (nr_thread)
nr_thread > 1 ? "s" : "");
if (nr_process) {
if (nr_thread)
- log_buf(&out, " and ");
- log_buf(&out, "%d process%s", nr_process,
+ __log_buf(&out, " and ");
+ __log_buf(&out, "%d process%s", nr_process,
nr_process > 1 ? "es" : "");
}
nr_process > 1 ? "es" : "");
}
log_info_buf(out.buf, out.buflen);
}
log_info_buf(out.buf, out.buflen);
}
name = client->name ? client->name : client->hostname;
if (!client->skip_newline && !(output_format & FIO_OUTPUT_TERSE))
name = client->name ? client->name : client->hostname;
if (!client->skip_newline && !(output_format & FIO_OUTPUT_TERSE))
- log_buf(&out, "<%s> ", name);
- log_buf(&out, "%s", buf);
+ __log_buf(&out, "<%s> ", name);
+ __log_buf(&out, "%s", buf);
log_info_buf(out.buf, out.buflen);
client->skip_newline = strchr(buf, '\n') == NULL;
}
log_info_buf(out.buf, out.buflen);
client->skip_newline = strchr(buf, '\n') == NULL;
}