Hello community,

here is the log from the commit of package cpprest for openSUSE:Factory checked 
in at 2018-06-19 12:04:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cpprest (Old)
 and      /work/SRC/openSUSE:Factory/.cpprest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cpprest"

Tue Jun 19 12:04:22 2018 rev:13 rq:617304 version:2.10.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/cpprest/cpprest.changes  2018-03-24 
16:15:55.818307539 +0100
+++ /work/SRC/openSUSE:Factory/.cpprest.new/cpprest.changes     2018-06-19 
12:04:23.776399599 +0200
@@ -1,0 +2,5 @@
+Sun Jun 17 11:09:02 UTC 2018 - [email protected]
+
+- fix build with gcc8 (add cpprestsdk-2.10.2-fix-gcc8.patch)
+
+-------------------------------------------------------------------

New:
----
  cpprestsdk-2.10.2-fix-gcc8.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cpprest.spec ++++++
--- /var/tmp/diff_new_pack.91ELV5/_old  2018-06-19 12:04:24.468373908 +0200
+++ /var/tmp/diff_new_pack.91ELV5/_new  2018-06-19 12:04:24.472373759 +0200
@@ -30,8 +30,9 @@
 # utf8_validation.hpp: MIT (ThirdPartyNotices.txt)
 License:        MIT AND BSD-3-Clause AND Zlib
 Group:          Development/Libraries/C and C++
-Url:            https://github.com/Microsoft/cpprestsdk
+URL:            https://github.com/Microsoft/cpprestsdk
 Source:         
https://github.com/Microsoft/cpprestsdk/archive/v%{version}.tar.gz#/cpprestsdk-%{version}.tar.gz
+Patch0:         cpprestsdk-2.10.2-fix-gcc8.patch
 BuildRequires:  cmake >= 3.0
 BuildRequires:  gcc-c++
 BuildRequires:  openssl-devel >= 1.0
@@ -76,6 +77,7 @@
 
 %prep
 %setup -q -n cpprestsdk-%{version}
+%patch0 -p1
 
 %build
 %cmake \
@@ -114,11 +116,14 @@
 %postun -n libcpprest%{major}_%{minor} -p /sbin/ldconfig
 
 %files -n libcpprest%{major}_%{minor}
-%doc CONTRIBUTORS.txt license.txt ThirdPartyNotices.txt
+%license license.txt ThirdPartyNotices.txt
+%license license.txt
+%doc CONTRIBUTORS.txt ThirdPartyNotices.txt
 %{_libdir}/libcpprest.so.%{major}.%{minor}
 
 %files devel
-%doc CONTRIBUTORS.txt license.txt
+%license license.txt ThirdPartyNotices.txt
+%doc CONTRIBUTORS.txt
 %{_includedir}/%{name}
 %{_includedir}/pplx
 %{_libdir}/libcpprest.so

++++++ cpprestsdk-2.10.2-fix-gcc8.patch ++++++
>From 212536f9d66400bef4400c55efd05dd01303c035 Mon Sep 17 00:00:00 2001
From: Andreas Stieger <[email protected]>
Date: Sun, 17 Jun 2018 13:00:05 +0200
Subject: [PATCH] Fix gcc8 error/warning -Werror=format-truncation=

utilities::datetime::to_string(): datetime_str and buf were oversized
for fitting into output without possible trunctation
---
 Release/src/utilities/asyncrt_utils.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Release/src/utilities/asyncrt_utils.cpp 
b/Release/src/utilities/asyncrt_utils.cpp
index 0e62bdee..be38907c 100644
--- a/Release/src/utilities/asyncrt_utils.cpp
+++ b/Release/src/utilities/asyncrt_utils.cpp
@@ -691,12 +691,13 @@ utility::string_t datetime::to_string(date_format format) 
const
     {
         // Append fractional second, which is a 7-digit value with no trailing 
zeros
         // This way, '1200' becomes '00012'
-        char buf[9] = { 0 };
+        const int max_frac_length = 8;
+        char buf[max_frac_length+1] = { 0 };
         snprintf(buf, sizeof(buf), ".%07ld", (long int)frac_sec);
         // trim trailing zeros
-        for (int i = 7; buf[i] == '0'; i--) buf[i] = '\0';
+        for (int i = max_frac_length-1; buf[i] == '0'; i--) buf[i] = '\0';
         // format the datetime into a separate buffer
-        char datetime_str[max_dt_length+1] = {0};
+        char datetime_str[max_dt_length-max_frac_length-1+1] = {0};
         strftime(datetime_str, sizeof(datetime_str), "%Y-%m-%dT%H:%M:%S", 
&datetime);
         // now print this buffer into the output buffer
         snprintf(output, sizeof(output), "%s%sZ", datetime_str, buf);
-- 
2.16.4


Reply via email to