nbd, nvmf: fix clang 4.0 packed member warnings
clang 4.0 introduced a new warning, -Waddress-of-packed-member, which triggers on a couple of spots in NBD and NVMf. Fix them up to silence the warnings. Change-Id: I134618f93528ea9a3d08050c34056670a58abdab Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/377441 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3dfd4a7c71
commit
a7b62cc4cb
@ -221,7 +221,10 @@ process_request(struct spdk_nbd_disk *nbd)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(from_be32(&io->req.magic) == NBD_REQUEST_MAGIC);
|
if (from_be32(&io->req.magic) != NBD_REQUEST_MAGIC) {
|
||||||
|
SPDK_ERRLOG("invalid request magic\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
switch (from_be32(&io->req.type)) {
|
switch (from_be32(&io->req.type)) {
|
||||||
case NBD_CMD_READ:
|
case NBD_CMD_READ:
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "nvmf_internal.h"
|
#include "nvmf_internal.h"
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
|
|
||||||
|
#include "spdk/endian.h"
|
||||||
#include "spdk/io_channel.h"
|
#include "spdk/io_channel.h"
|
||||||
#include "spdk/trace.h"
|
#include "spdk/trace.h"
|
||||||
#include "spdk/nvme_spec.h"
|
#include "spdk/nvme_spec.h"
|
||||||
@ -831,7 +832,7 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
|
|||||||
spdk_strcpy_pad(cdata->subnqn, subsystem->subnqn, sizeof(cdata->subnqn), '\0');
|
spdk_strcpy_pad(cdata->subnqn, subsystem->subnqn, sizeof(cdata->subnqn), '\0');
|
||||||
|
|
||||||
SPDK_DEBUGLOG(SPDK_TRACE_NVMF, "ctrlr data: maxcmd 0x%x\n", cdata->maxcmd);
|
SPDK_DEBUGLOG(SPDK_TRACE_NVMF, "ctrlr data: maxcmd 0x%x\n", cdata->maxcmd);
|
||||||
SPDK_DEBUGLOG(SPDK_TRACE_NVMF, "sgls data: 0x%x\n", *(uint32_t *)&cdata->sgls);
|
SPDK_DEBUGLOG(SPDK_TRACE_NVMF, "sgls data: 0x%x\n", from_le32(&cdata->sgls));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NVM subsystem fields (reserved for discovery subsystems)
|
* NVM subsystem fields (reserved for discovery subsystems)
|
||||||
|
Loading…
Reference in New Issue
Block a user