blobstore: fix unused variable warning on non-debug builds

gcc complains:

blobstore.c: In function ‘_spdk_blob_load_cpl’:
blobstore.c:978:12: warning: unused variable ‘max_md_lba’ [-Wunused-variable]

Change-Id: If2875d2d83edce6d1b544d6a4f51e78fa760d752
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461750
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-07-15 07:50:57 +02:00 committed by Changpeng Liu
parent 5acf617c6e
commit 69642141bb

View File

@ -977,7 +977,9 @@ _spdk_blob_load_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
uint64_t next_lba = _spdk_bs_page_to_lba(blob->bs, blob->bs->md_start + next_page);
uint64_t max_md_lba = _spdk_bs_page_to_lba(blob->bs, blob->bs->md_start + blob->bs->md_len);
assert(next_lba < max_md_lba);
if (next_lba >= max_md_lba) {
assert(false);
}
/* Read the next page */
ctx->num_pages++;