opal-prd/skiboot-6.2-warning.patch
Vasant Hegde 5a59f5b638 opal-prd: Fix build warnings
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2019-03-07 12:16:28 +05:30

27 lines
805 B
Diff

diff --git a/libflash/ecc.c b/libflash/ecc.c
index 9ed9015af..e920dfa98 100644
--- a/libflash/ecc.c
+++ b/libflash/ecc.c
@@ -177,7 +177,7 @@ static int eccbyte(uint64_t *dst, struct ecc64 *src)
return 0;
}
-static uint64_t *inc_uint64_by(const uint64_t *p, uint64_t i)
+static uint64_t *inc_uint64_by(const void *p, uint64_t i)
{
return (uint64_t *)(((char *)p) + i);
}
diff --git a/libflash/libffs.c b/libflash/libffs.c
index 221c2b024..4eb0ffa99 100644
--- a/libflash/libffs.c
+++ b/libflash/libffs.c
@@ -522,7 +522,7 @@ int ffs_part_info(struct ffs_handle *ffs, uint32_t part_idx,
n = calloc(1, FFS_PART_NAME_MAX + 1);
if (!n)
return FLASH_ERR_MALLOC_FAILED;
- strncpy(n, ent->name, FFS_PART_NAME_MAX);
+ strncpy(n, ent->name, FFS_PART_NAME_MAX + 1);
*name = n;
}
return 0;