]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/librbd/fsx.c: fix gcc warning
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 4 Jun 2014 21:10:42 +0000 (23:10 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 4 Jun 2014 21:10:42 +0000 (23:10 +0200)
commitf17a9633fc044b8b073f15ac2762b6c32a32d77e
tree331378e8b483aed36a6423aa20738b0cc3134490
parent18c07ec5a335626b333c5146137851e1b59e6495
test/librbd/fsx.c: fix gcc warning

Initialize pointer with NULL before call posix_memalign() to fix
gcc warning:

test/librbd/fsx.c:1402:13: warning: ‘temp_buf’ may be used
 uninitialized in this function [-Wmaybe-uninitialized]
  if ((ret = ops->read(&cur_ctx, 0, file_info.st_size, temp_buf)) < 0) {
             ^
test/librbd/fsx.c:1398:13: warning: ‘good_buf’ may be used
 uninitialized in this function [-Wmaybe-uninitialized]
  if ((ret = pread(fd, good_buf, file_info.st_size, 0)) < 0) {

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/librbd/fsx.c