diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-22 14:06:15 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-22 14:15:36 +0200 |
commit | bc239f15eb935f7962def5b8fde22b64b0b86b4f (patch) | |
tree | bd37333a37950bc721f2088eccabbb5230f3d20e | |
parent | d12ba022c8082de2d804010992c6ee1076b9f571 (diff) | |
download | lvm2-bc239f15eb935f7962def5b8fde22b64b0b86b4f.tar.gz |
coverity: ignore some dm_strncpy results
Using them only for debug so ignorable.
Also don't mark stack char buffer alignment, compiler already knows
what's the best here.
-rw-r--r-- | lib/cache/lvmetad.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index 8d13a5989..8a1a2c538 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -2028,8 +2028,8 @@ static void _update_changed_pvs_in_udev(struct cmd_context *cmd, { struct pv_cache_list *before; struct pv_cache_list *after; - char id_before[ID_LEN + 1] __attribute__((aligned(8))); - char id_after[ID_LEN + 1] __attribute__((aligned(8))); + char id_before[ID_LEN + 1]; + char id_after[ID_LEN + 1]; int found; dm_list_iterate_items(before, pvc_before) { @@ -2043,8 +2043,8 @@ static void _update_changed_pvs_in_udev(struct cmd_context *cmd, continue; if (!id_equal(&before->pvid, &after->pvid)) { - dm_strncpy(id_before, (char *) &before->pvid, sizeof(id_before)); - dm_strncpy(id_after, (char *) &after->pvid, sizeof(id_after)); + (void) dm_strncpy(id_before, (char *) &before->pvid, sizeof(id_before)); + (void) dm_strncpy(id_after, (char *) &after->pvid, sizeof(id_after)); log_debug_devs("device %d:%d changed pvid from %s to %s", (int)MAJOR(before->devt), (int)MINOR(before->devt), @@ -2070,7 +2070,7 @@ static void _update_changed_pvs_in_udev(struct cmd_context *cmd, } if (!found) { - dm_strncpy(id_before, (char *) &before->pvid, sizeof(id_before)); + (void) dm_strncpy(id_before, (char *) &before->pvid, sizeof(id_before)); log_debug_devs("device %d:%d pvid %s vg %s is gone", (int)MAJOR(before->devt), (int)MINOR(before->devt), |