Work around cppcheck issue

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
This commit is contained in:
Ondrej Mosnacek 2019-07-25 16:58:29 +02:00
parent 4a47da3f29
commit 12b9ffe9da
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/test/kcapi-main.c b/test/kcapi-main.c
index 2ae0edb..6818e67 100644
--- a/test/kcapi-main.c
+++ b/test/kcapi-main.c
@@ -237,7 +237,7 @@ static inline uint64_t _time_delta(struct timespec *start, struct timespec *end)
static int get_random(uint8_t *buf, uint32_t buflen, unsigned int flags)
{
- int ret;
+ int ret = 0;
if (buflen > INT_MAX)
return 1;

View File

@ -97,7 +97,7 @@ bin/kcapi-hasher -n fipshmac -d "$lib_path"/fipscheck \\\
Name: libkcapi
Version: %{vmajor}.%{vminor}.%{vpatch}
Release: 3%{?dist}
Release: 4%{?dist}
Summary: User space interface to the Linux Kernel Crypto API
License: BSD or GPLv2
@ -106,6 +106,7 @@ Source0: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz
Source1: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz.asc
Patch0: %{giturl}/commit/52620ec798a5.patch#/000-Fix-build-with-gcc-8.2.x.patch
Patch1: 001-workaround-cppcheck-bug.patch
BuildRequires: clang
BuildRequires: coreutils
@ -447,9 +448,15 @@ popd
%changelog
* Thu Jul 25 2019 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.4-4
- Work around cppcheck issue
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon May 27 2019 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.4-2
- Fix FTBFS: hardlink is now in bindir
* Sat Feb 02 2019 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.4-1
- Update to upstream version 1.1.4