diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-04-04 00:28:13 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-04-04 06:43:08 -0800 |
commit | 978c16040525ffe1199bed6afd799eaa64d0f01c (patch) | |
tree | 789f68229be0af9579238a6d1e86af576ab33b3d /cmd_debug.c | |
parent | 64c325ef483c863c720a7f53c6b3126e583e05a0 (diff) |
Fix some clang warnings
the issue in cmd_debug - passing members of struct bpos to kstrtoull,
which aren't aligned - was a legit bug
Diffstat (limited to 'cmd_debug.c')
-rw-r--r-- | cmd_debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd_debug.c b/cmd_debug.c index 64f7f379..cfd6e59c 100644 --- a/cmd_debug.c +++ b/cmd_debug.c @@ -192,14 +192,14 @@ static struct bpos parse_pos(char *buf) char *s = buf; char *inode = strsep(&s, ":"); char *offset = strsep(&s, ":"); - struct bpos ret = { 0 }; + u64 inode_v, offset_v; if (!inode || !offset || s || - kstrtoull(inode, 10, &ret.inode) || - kstrtoull(offset, 10, &ret.offset)) + kstrtoull(inode, 10, &inode_v) || + kstrtoull(offset, 10, &offset_v)) die("invalid bpos %s", buf); - return ret; + return (struct bpos) { .inode = inode_v, .offset = offset_v }; } static void list_keys_usage(void) |