summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-09-15 08:48:06 -0600
committerJens Axboe <axboe@fb.com>2015-09-15 08:48:06 -0600
commitdd093eb1c48e0d86b835758b96a9886fb7773aa4 (patch)
treea41be488eb9c77e2236d6c39b0b653d730afd64d
parentf55e6d10cf797a0418a26d59f8bd40d50753b153 (diff)
downloadblktrace-dd093eb1c48e0d86b835758b96a9886fb7773aa4.tar.gz
blktrace-dd093eb1c48e0d86b835758b96a9886fb7773aa4.tar.bz2
Fix warnings on newer gcc
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--blkiomon.c2
-rw-r--r--btreplay/btreplay.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/blkiomon.c b/blkiomon.c
index a895f65..f8b0c9d 100644
--- a/blkiomon.c
+++ b/blkiomon.c
@@ -198,7 +198,7 @@ static struct dstat *blkiomon_find_dstat(struct rb_search *search, __u32 device)
static struct dstat *blkiomon_get_dstat(__u32 device)
{
struct dstat *dstat;
- struct rb_search search;
+ struct rb_search search = { 0, };
pthread_mutex_lock(&dstat_mutex);
diff --git a/btreplay/btreplay.c b/btreplay/btreplay.c
index f762279..2a1e1cc 100644
--- a/btreplay/btreplay.c
+++ b/btreplay/btreplay.c
@@ -646,7 +646,7 @@ static void find_input_devs(char *idir)
static void read_map_devs(char *file_name)
{
FILE *fp;
- char *from_dev, *to_dev;
+ char from_dev[256], to_dev[256];
fp = fopen(file_name, "r");
if (!fp) {
@@ -654,7 +654,7 @@ static void read_map_devs(char *file_name)
/*NOTREACHED*/
}
- while (fscanf(fp, "%as %as", &from_dev, &to_dev) == 2) {
+ while (fscanf(fp, "%s %s", from_dev, to_dev) == 2) {
struct map_dev *mdp = malloc(sizeof(*mdp));
mdp->from_dev = from_dev;