[mimetic] updated to 0.9.7 + added patch to fix undefined behavior

ensc ensc at fedoraproject.org
Wed Jan 4 13:34:17 UTC 2012


commit 757684aa300357223a0ab31424330ddc57033160
Author: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
Date:   Wed Jan 4 14:30:22 2012 +0100

    updated to 0.9.7 + added patch to fix undefined behavior

 .gitignore     |    2 +-
 lastver        |    2 +-
 mimetic.spec   |   13 ++++++++++---
 sources        |    2 +-
 undef-op.patch |   38 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 51 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c1f3548..832af82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-mimetic-0.9.6.tar.gz
+/mimetic-0.9.7.tar.gz
diff --git a/lastver b/lastver
index 85b7c69..c81aa44 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.9.6
+0.9.7
diff --git a/mimetic.spec b/mimetic.spec
index df6f2ef..78c8163 100644
--- a/mimetic.spec
+++ b/mimetic.spec
@@ -1,8 +1,8 @@
 %{!?release_func:%global release_func() %1%{?dist}}
 
 Name:		mimetic
-Version:	0.9.6
-Release:	%release_func 2
+Version:	0.9.7
+Release:	%release_func 1700
 Summary:	A full featured MIME library written in C++
 
 Group:		System Environment/Libraries
@@ -10,6 +10,7 @@ License:	MIT
 URL:		http://www.codesink.org/mimetic_mime_library.html
 Source0:	http://www.codesink.org/download/%name-%version.tar.gz
 Patch0:		mimetic-0.9.2-noconfigh.patch
+Patch1:		undef-op.patch
 BuildRoot:	%_tmppath/%name-%version-%release-root
 
 BuildRequires:	doxygen
@@ -40,7 +41,8 @@ will use %name.
 
 %prep
 %setup -q
-%patch0 -p1 -b .noconfigh
+%patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -84,6 +86,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Jan  4 2012 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.9.7-1700
+- updated to 0.9.7
+- added patch to fix undefined behavior
+- fixed URIs
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/sources b/sources
index db34c61..77ee273 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f853036fddf3a89cdd66659776d2dbea  mimetic-0.9.6.tar.gz
+07cb65d98fbff212805928a2827db7db  mimetic-0.9.7.tar.gz
diff --git a/undef-op.patch b/undef-op.patch
new file mode 100644
index 0000000..d927cdf
--- /dev/null
+++ b/undef-op.patch
@@ -0,0 +1,38 @@
+
+| strutils.cxx:31:45: warning: operation on 'idx' may be undefined [-Wsequence-point]
+
+Index: mimetic-0.9.7/mimetic/strutils.cxx
+===================================================================
+--- mimetic-0.9.7.orig/mimetic/strutils.cxx
++++ mimetic-0.9.7/mimetic/strutils.cxx
+@@ -28,7 +28,7 @@ string canonical(const string& s, bool n
+     idx = input.length() - 1;
+     while(input[idx] == ' ')
+         idx--;
+-    input.erase(idx, input.length() - ++idx);
++    input.erase(idx, input.length() - (idx+1));
+     // removes rfc822 comments and non-required spaces
+     bool in_dquote = false, has_brack = false;
+     int in_par = 0, in_brack = 0, par_last;
+Index: mimetic-0.9.7/mimetic/circular_buffer.h
+===================================================================
+--- mimetic-0.9.7.orig/mimetic/circular_buffer.h
++++ mimetic-0.9.7/mimetic/circular_buffer.h
+@@ -52,7 +52,7 @@ struct circular_buffer
+     inline void push_back(const value_type& c)
+     {
+         m_pItem[m_last] = c;
+-        m_last = ++m_last % m_sz;
++        m_last = (m_last+1) % m_sz;
+         m_count += (m_count == m_sz ? 0 : 1);
+     }
+     inline void push_front(const value_type& c)
+@@ -63,7 +63,7 @@ struct circular_buffer
+     }
+     inline void pop_front()
+     {
+-        m_first = ++m_first % m_sz;
++        m_first = (m_first+1) % m_sz;
+         m_count--;
+     }
+     inline void pop_back()


More information about the scm-commits mailing list