summaryrefslogtreecommitdiff
path: root/btreplay
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 /btreplay
parentf55e6d10cf797a0418a26d59f8bd40d50753b153 (diff)
downloadblktrace-dd093eb1c48e0d86b835758b96a9886fb7773aa4.tar.gz
blktrace-dd093eb1c48e0d86b835758b96a9886fb7773aa4.tar.bz2
Fix warnings on newer gcc
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'btreplay')
-rw-r--r--btreplay/btreplay.c4
1 files changed, 2 insertions, 2 deletions
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;