opal-prd/skiboot-6.2-warning.patch

27 lines
805 B
Diff
Raw Normal View History

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;