projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0ea08c
)
Fix bogus 'may be used uninitialized' warning from older gcc versions
author
Jens Axboe
<jens.axboe@oracle.com>
Fri, 5 Dec 2008 12:17:16 +0000
(13:17 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 5 Dec 2008 12:17:16 +0000
(13:17 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
io_u.c
patch
|
blob
|
blame
|
history
diff --git
a/io_u.c
b/io_u.c
index 8863fa749f13ece7342484101db132ee94d8714a..f2406e8c1ec91cb86f56196b2f83e33dca9087ca 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-882,7
+882,11
@@
void io_u_log_error(struct thread_data *td, struct io_u *io_u)
static void io_completed(struct thread_data *td, struct io_u *io_u,
struct io_completion_data *icd)
{
- unsigned long usec;
+ /*
+ * Older gcc's are too dumb to realize that usec is always used
+ * initialized, silence that warning.
+ */
+ unsigned long uninitialized_var(usec);
dprint_io_u(io_u, "io complete");