opal-prd: Fix build warnings
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
This commit is contained in:
parent
974097d2b7
commit
5a59f5b638
@ -2,7 +2,7 @@
|
||||
|
||||
Name: opal-prd
|
||||
Version: 6.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: OPAL Processor Recovery Diagnostics Daemon
|
||||
|
||||
License: ASL 2.0
|
||||
@ -26,6 +26,7 @@ Source0: https://github.com/open-power/%{project}/archive/v%{version}/%{project}
|
||||
Source1: opal-prd-rsyslog
|
||||
Source2: opal-prd-logrotate
|
||||
Patch1: skiboot-6.1-annocheck.patch
|
||||
Patch2: skiboot-6.2-warning.patch
|
||||
|
||||
%description
|
||||
This package provides a daemon to load and run the OpenPower firmware's
|
||||
@ -57,6 +58,7 @@ services to the OS (Linux) on IBM Power and OpenPower systems.
|
||||
|
||||
%setup -q -n %{project}-%{version}
|
||||
%patch1 -p1 -b .annocheck
|
||||
%patch2 -p1 -b .warning
|
||||
|
||||
%build
|
||||
OPAL_PRD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" ASFLAGS="-m64 -Wa,--generate-missing-build-notes=yes" -C external/opal-prd
|
||||
|
26
skiboot-6.2-warning.patch
Normal file
26
skiboot-6.2-warning.patch
Normal file
@ -0,0 +1,26 @@
|
||||
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;
|
Loading…
Reference in New Issue
Block a user