3
0
forked from pool/libxcrypt

Accepting request 677322 from home:Andreas_Schwab:Factory

- format-overflow.patch: Fix -Werror=format-overflow

OBS-URL: https://build.opensuse.org/request/show/677322
OBS-URL: https://build.opensuse.org/package/show/Base:System/libxcrypt?expand=0&rev=12
This commit is contained in:
Andreas Schwab 2019-02-19 10:54:08 +00:00 committed by Git OBS Bridge
parent fa9362ec05
commit bd910583d2
3 changed files with 83 additions and 0 deletions

77
format-overflow.patch Normal file
View File

@ -0,0 +1,77 @@
From 2e4135284e7aaeac2218878041de31d8e724dc8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Thu, 24 Jan 2019 22:22:36 +0100
Subject: [PATCH] test-alg-hmac-sha1: Fix -Wformat-overflow.
---
test-alg-hmac-sha1.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test-alg-hmac-sha1.c b/test-alg-hmac-sha1.c
index ffc6cb4..167f0b4 100644
--- a/test-alg-hmac-sha1.c
+++ b/test-alg-hmac-sha1.c
@@ -162,8 +162,15 @@ main (void)
if (strcmp (dbuf, test->expect) != 0)
{
n = 1;
- printf ("\nkey=%s, data=%s,\nresult=%s: %s\n",
- test->key, test->data, dbuf, test->expect);
+ printf ("\nkey=");
+ puts (test->key);
+ puts (", data=");
+ puts (test->data);
+ printf (",\nresult=");
+ puts (dbuf);
+ puts (": ");
+ puts (test->expect);
+ printf ("\n");
}
}
return n;
--
2.20.1
From 8d109010f022ac75e383ac74d1961c0c63a16c3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Tue, 19 Feb 2019 10:59:43 +0100
Subject: [PATCH] test-alg-hmac-sha1: Use fputs() instead of puts().
puts() appends a newline character at the
end of the output, while fputs() does not.
---
test-alg-hmac-sha1.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/test-alg-hmac-sha1.c b/test-alg-hmac-sha1.c
index 167f0b4..5a87c7b 100644
--- a/test-alg-hmac-sha1.c
+++ b/test-alg-hmac-sha1.c
@@ -162,15 +162,15 @@ main (void)
if (strcmp (dbuf, test->expect) != 0)
{
n = 1;
- printf ("\nkey=");
- puts (test->key);
- puts (", data=");
- puts (test->data);
- printf (",\nresult=");
- puts (dbuf);
- puts (": ");
- puts (test->expect);
- printf ("\n");
+ fputs ("\nkey=", stdout);
+ fputs (test->key, stdout);
+ fputs (", data=", stdout);
+ fputs (test->data, stdout);
+ fputs (",\nresult=", stdout);
+ fputs (dbuf, stdout);
+ fputs (": ", stdout);
+ fputs (test->expect, stdout);
+ fputs ("\n", stdout);
}
}
return n;
--
2.20.1

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 19 10:49:30 UTC 2019 - schwab@suse.de
- format-overflow.patch: Fix -Werror=format-overflow
-------------------------------------------------------------------
Thu Feb 14 13:54:55 UTC 2019 - Martin Liška <mliska@suse.cz>

View File

@ -25,6 +25,7 @@ Group: Development/Libraries/C and C++
URL: https://github.com/besser82/%{name}
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: baselibs.conf
Patch0: format-overflow.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool