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>
exit(169);
}
+ good_buf = NULL;
ret = posix_memalign((void **)&good_buf, MAX(writebdy, sizeof(void *)),
file_info.st_size);
if (ret > 0) {
exit(96);
}
+ temp_buf = NULL;
ret = posix_memalign((void **)&temp_buf, MAX(readbdy, sizeof(void *)),
file_info.st_size);
if (ret > 0) {