It causes complaints on other compilers (clang). One case
was actually not used at all, initialize the rest to 0.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
#define __must_check
#endif
#define __must_check
#endif
-#define uninitialized_var(x) x = x
-
#ifndef _weak
#ifndef __CYGWIN__
#define _weak __attribute__((weak))
#ifndef _weak
#ifndef __CYGWIN__
#define _weak __attribute__((weak))
static int fio_spliceio_queue(struct thread_data *td, struct io_u *io_u)
{
struct spliceio_data *sd = td->io_ops->data;
static int fio_spliceio_queue(struct thread_data *td, struct io_u *io_u)
{
struct spliceio_data *sd = td->io_ops->data;
- int uninitialized_var(ret);
static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u)
{
const int ddir = io_u->ddir;
static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u)
{
const int ddir = io_u->ddir;
- unsigned int uninitialized_var(buflen);
+ unsigned int buflen = 0;
unsigned int minbs, maxbs;
unsigned long r, rand_max;
unsigned int minbs, maxbs;
unsigned long r, rand_max;
struct io_completion_data *icd,
const enum fio_ddir idx, unsigned int bytes)
{
struct io_completion_data *icd,
const enum fio_ddir idx, unsigned int bytes)
{
- unsigned long uninitialized_var(lusec);
+ unsigned long lusec = 0;
if (!td->o.disable_clat || !td->o.disable_bw)
lusec = utime_since(&io_u->issue_time, &icd->time);
if (!td->o.disable_clat || !td->o.disable_bw)
lusec = utime_since(&io_u->issue_time, &icd->time);
static void io_completed(struct thread_data *td, struct io_u *io_u,
struct io_completion_data *icd)
{
static void io_completed(struct thread_data *td, struct io_u *io_u,
struct io_completion_data *icd)
{
- /*
- * Older gcc's are too dumb to realize that usec is always used
- * initialized, silence that warning.
- */
- unsigned long uninitialized_var(usec);
struct fio_file *f;
dprint_io_u(io_u, "io complete");
struct fio_file *f;
dprint_io_u(io_u, "io complete");