QEMU 3.0
block/sheepdog.c: In function 'find_vdi_name': block/sheepdog.c:1239:5: error: 'strncpy' specified bound 256 equals destination size [-Werror=stringop-truncation] strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If this is the intended behavior, please suppress the warning. For example:
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstringop-truncation" strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN); #pragma GCC diagnostic pop
QEMU 3.0
block/sheepdog.c: In function 'find_vdi_name': c:1239: 5: error: 'strncpy' specified bound 256 equals destination size [-Werror= stringop- truncation] VDI_TAG_ LEN); ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~
block/sheepdog.
strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_
^~
If this is the intended behavior, please suppress the warning. For example:
#pragma GCC diagnostic push truncation" VDI_TAG_ LEN);
#pragma GCC diagnostic ignored "-Wstringop-
strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_
#pragma GCC diagnostic pop