Skip to content
Browse files

make gcc shutup about `time_diff’ may be used uninitialized in this f…

…unction
  • Loading branch information...
1 parent bd61164 commit f8083ac21351cb8a97da923233fa0bb5bdfccfd7 @tomato42 committed Aug 5, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 activity_stats.c
View
4 activity_stats.c
@@ -247,8 +247,10 @@ get_block_activity_raw_score(struct block_activity *block, int type,
} else if (type == T_WRITE) {
time_diff = block->writes[i].time - last_access;
last_access = block->writes[i].time;
- } else
+ } else {
assert(1);
+ return -1;
+ }
// "age" past score
score *= exp(-1.0 * scale * time_diff);

0 comments on commit f8083ac

Please sign in to comment.
Something went wrong with that request. Please try again.