lib/nvme: Fix scanbuild issue about uninitialized value.
Issue: nvme.c:766:2: warning: 4th function call argument is an uninitialized value snprintf(trid->trstring, SPDK_NVMF_TRSTRING_MAX_LEN, "%s", trstring); Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: I4b0ae106ef8e4e72e80ec96d10010fddf8173144 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1314 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
7098c65339
commit
4a1ec34d3b
@ -742,7 +742,7 @@ void
|
||||
spdk_nvme_trid_populate_transport(struct spdk_nvme_transport_id *trid,
|
||||
enum spdk_nvme_transport_type trtype)
|
||||
{
|
||||
const char *trstring;
|
||||
const char *trstring = "";
|
||||
|
||||
trid->trtype = trtype;
|
||||
switch (trtype) {
|
||||
|
Loading…
Reference in New Issue
Block a user