From 7d26e4a07def41b2bca90d877196eb457138a2cfa06f0debe15f55c732b1c4fe Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 28 Jan 2016 19:06:37 +0000 Subject: [PATCH] - add gsoap-00-builtsource.diff, gsoap-03-seqpoint.diff to fix more compiler warnings OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=45 --- gsoap-00-builtsource.diff | 23 ++++++++++++++ gsoap-01-sharedlibs.diff | 26 +++++++-------- gsoap-02-typepuns.diff | 67 ++++++--------------------------------- gsoap-03-seqpoint.diff | 54 +++++++++++++++++++++++++++++++ gsoap-allocator.diff | 4 +-- gsoap.changes | 6 ++++ gsoap.spec | 12 ++++--- 7 files changed, 114 insertions(+), 78 deletions(-) create mode 100644 gsoap-00-builtsource.diff create mode 100644 gsoap-03-seqpoint.diff diff --git a/gsoap-00-builtsource.diff b/gsoap-00-builtsource.diff new file mode 100644 index 0000000..ec317c8 --- /dev/null +++ b/gsoap-00-builtsource.diff @@ -0,0 +1,23 @@ +From: Jan Engelhardt +Date: 2016-01-28 19:30:10.973606466 +0100 + +Every .c/.cpp file which is updated/created needs to be in +BUILT_SOURCES. + +--- + gsoap/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: gsoap-2.8.22/gsoap/Makefile.am +=================================================================== +--- gsoap-2.8.22.orig/gsoap/Makefile.am ++++ gsoap-2.8.22/gsoap/Makefile.am +@@ -49,7 +49,7 @@ libgsoapssl_a_CFLAGS = $(SOAPCPP2_DEBUG) + libgsoapssl___a_SOURCES = stdsoap2_ssl_cpp.cpp dom_cpp.cpp + libgsoapssl___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM + +-BUILT_SOURCES = stdsoap2_cpp.cpp dom_cpp.cpp $(lib_LIBRARIES) ++BUILT_SOURCES = stdsoap2_ck.c stdsoap2_cpp.cpp stdsoap2_ck_cpp.cpp stdsoap2_ssl.c stdsoap2_ssl_cpp.cpp dom.cpp + + include_HEADERS = stdsoap2.h + diff --git a/gsoap-01-sharedlibs.diff b/gsoap-01-sharedlibs.diff index 737bedd..99deba1 100644 --- a/gsoap-01-sharedlibs.diff +++ b/gsoap-01-sharedlibs.diff @@ -10,10 +10,10 @@ build: always use shared libraries gsoap/samples/databinding/Makefile.am | 2 +- 4 files changed, 28 insertions(+), 20 deletions(-) -Index: gsoap-2.8.21/configure.ac +Index: gsoap-2.8.22/configure.ac =================================================================== ---- gsoap-2.8.21.orig/configure.ac -+++ gsoap-2.8.21/configure.ac +--- gsoap-2.8.22.orig/configure.ac ++++ gsoap-2.8.22/configure.ac @@ -15,8 +15,8 @@ AM_PROG_CC_C_O AM_PROG_LEX AC_PROG_YACC @@ -52,10 +52,10 @@ Index: gsoap-2.8.21/configure.ac fi AC_SUBST(WSDL2H_EXTRA_FLAGS) AC_SUBST(WSDL2H_EXTRA_LIBS) -Index: gsoap-2.8.21/gsoap/Makefile.am +Index: gsoap-2.8.22/gsoap/Makefile.am =================================================================== ---- gsoap-2.8.21.orig/gsoap/Makefile.am -+++ gsoap-2.8.21/gsoap/Makefile.am +--- gsoap-2.8.22.orig/gsoap/Makefile.am ++++ gsoap-2.8.22/gsoap/Makefile.am @@ -34,20 +34,28 @@ stdsoap2_ssl_cpp.cpp: stdsoap2.cpp dom_cpp.cpp: dom.cpp $(LN_S) -f $(srcdir)/dom.cpp dom_cpp.cpp @@ -96,12 +96,12 @@ Index: gsoap-2.8.21/gsoap/Makefile.am +libgsoapssl___la_LDFLAGS = ${libgsoap_la_LDFLAGS} +libgsoapssl___la_LIBADD = ${SAMPLE_SSL_LIBS} - BUILT_SOURCES = stdsoap2_cpp.cpp dom_cpp.cpp $(lib_LIBRARIES) + BUILT_SOURCES = stdsoap2_ck.c stdsoap2_cpp.cpp stdsoap2_ck_cpp.cpp stdsoap2_ssl.c stdsoap2_ssl_cpp.cpp dom.cpp -Index: gsoap-2.8.21/gsoap/samples/autotest/Makefile.am +Index: gsoap-2.8.22/gsoap/samples/autotest/Makefile.am =================================================================== ---- gsoap-2.8.21.orig/gsoap/samples/autotest/Makefile.am -+++ gsoap-2.8.21/gsoap/samples/autotest/Makefile.am +--- gsoap-2.8.22.orig/gsoap/samples/autotest/Makefile.am ++++ gsoap-2.8.22/gsoap/samples/autotest/Makefile.am @@ -14,7 +14,7 @@ SOAP_FLAGS=-SL -T -I$(top_srcdir)/gsoap/ WSDLINPUT=$(srcdir)/examples.wsdl SOAPHEADER=$(srcdir)/examples.h @@ -111,10 +111,10 @@ Index: gsoap-2.8.21/gsoap/samples/autotest/Makefile.am $(SOAP_CPP_SRC) : $(WSDLINPUT) $(WSDL) $(WSDL_FLAGS) $(WSDLINPUT) -Index: gsoap-2.8.21/gsoap/samples/databinding/Makefile.am +Index: gsoap-2.8.22/gsoap/samples/databinding/Makefile.am =================================================================== ---- gsoap-2.8.21.orig/gsoap/samples/databinding/Makefile.am -+++ gsoap-2.8.21/gsoap/samples/databinding/Makefile.am +--- gsoap-2.8.22.orig/gsoap/samples/databinding/Makefile.am ++++ gsoap-2.8.22/gsoap/samples/databinding/Makefile.am @@ -14,7 +14,7 @@ SOAP_FLAGS=-0 -CS -p address -I$(top_src WSDLINPUT=$(srcdir)/address.xsd SOAPHEADER=$(srcdir)/address.h diff --git a/gsoap-02-typepuns.diff b/gsoap-02-typepuns.diff index ebb509a..45803ea 100644 --- a/gsoap-02-typepuns.diff +++ b/gsoap-02-typepuns.diff @@ -1,9 +1,14 @@ References: https://sourceforge.net/p/gsoap2/patches/124/attachment/gsoap-aliasing.patch -diff -ur gsoap-2.8.orig/gsoap/plugin/wsaapi.c gsoap-2.8/gsoap/plugin/wsaapi.c ---- gsoap-2.8.orig/gsoap/plugin/wsaapi.c 2015-04-14 08:46:30.000000000 +0200 -+++ gsoap-2.8/gsoap/plugin/wsaapi.c 2015-05-05 09:19:27.985619710 +0200 -@@ -599,7 +599,7 @@ +--- + gsoap/plugin/wsaapi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: gsoap-2.8.22/gsoap/plugin/wsaapi.c +=================================================================== +--- gsoap-2.8.22.orig/gsoap/plugin/wsaapi.c ++++ gsoap-2.8.22/gsoap/plugin/wsaapi.c +@@ -599,7 +599,7 @@ soap_wsa_rand_uuid(struct soap *soap) k += 0x7FFFFFFF; r2 = k; k &= 0x8FFFFFFF; @@ -12,42 +17,6 @@ diff -ur gsoap-2.8.orig/gsoap/plugin/wsaapi.c gsoap-2.8/gsoap/plugin/wsaapi.c #endif r3 = soap_random; r4 = soap_random; -diff -ur gsoap-2.8.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp gsoap-2.8/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp ---- gsoap-2.8.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp 2015-04-14 08:46:34.000000000 +0200 -+++ gsoap-2.8/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp 2015-05-05 09:01:31.633153838 +0200 -@@ -3105,11 +3105,11 @@ - int - SOAP_FMAC2 - soap_rand() --{ unsigned char buf[4]; -+{ int buf; - if (!soap_ssl_init_done) - soap_ssl_init(); -- RAND_pseudo_bytes(buf, 4); -- return *(int*)buf; -+ RAND_pseudo_bytes((unsigned char*)&buf, sizeof(int)); -+ return buf; - } - #endif - #endif -diff -ur gsoap-2.8.orig/gsoap/stdsoap2.c gsoap-2.8/gsoap/stdsoap2.c ---- gsoap-2.8.orig/gsoap/stdsoap2.c 2015-04-14 08:46:36.000000000 +0200 -+++ gsoap-2.8/gsoap/stdsoap2.c 2015-05-05 09:01:31.633153838 +0200 -@@ -3105,11 +3105,11 @@ - int - SOAP_FMAC2 - soap_rand() --{ unsigned char buf[4]; -+{ int buf; - if (!soap_ssl_init_done) - soap_ssl_init(); -- RAND_pseudo_bytes(buf, 4); -- return *(int*)buf; -+ RAND_pseudo_bytes((unsigned char*)&buf, sizeof(int)); -+ return buf; - } - #endif - #endif diff -ur gsoap-2.8.orig/gsoap/stdsoap2.cpp gsoap-2.8/gsoap/stdsoap2.cpp --- gsoap-2.8.orig/gsoap/stdsoap2.cpp 2015-04-14 08:46:36.000000000 +0200 +++ gsoap-2.8/gsoap/stdsoap2.cpp 2015-05-05 09:01:31.633153838 +0200 @@ -66,21 +35,3 @@ diff -ur gsoap-2.8.orig/gsoap/stdsoap2.cpp gsoap-2.8/gsoap/stdsoap2.cpp } #endif #endif -diff -ur gsoap-2.8.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp gsoap-2.8/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp ---- gsoap-2.8.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp 2015-04-14 08:46:36.000000000 +0200 -+++ gsoap-2.8/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp 2015-05-05 09:01:31.633153838 +0200 -@@ -3105,11 +3105,11 @@ - int - SOAP_FMAC2 - soap_rand() --{ unsigned char buf[4]; -+{ int buf; - if (!soap_ssl_init_done) - soap_ssl_init(); -- RAND_pseudo_bytes(buf, 4); -- return *(int*)buf; -+ RAND_pseudo_bytes((unsigned char*)&buf, sizeof(int)); -+ return buf; - } - #endif - #endif diff --git a/gsoap-03-seqpoint.diff b/gsoap-03-seqpoint.diff new file mode 100644 index 0000000..1aac9d5 --- /dev/null +++ b/gsoap-03-seqpoint.diff @@ -0,0 +1,54 @@ +From: Jan Engelhardt +Date: 2016-01-28 19:19:57.092815111 +0100 + +In file included from stdsoap2_ssl.c:60:0: +stdsoap2_ssl.c: In function ‘soap_getgziphdr’: +stdsoap2.h:2347:128: warning: operation on ‘soap->bufidx’ may be undefined [-Wsequence-point] + # define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) + ^ +stdsoap2_ssl.c:15576:14: note: in expansion of macro ‘soap_get1’ + { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) + ^ + +--- + gsoap/stdsoap2.cpp | 2 -- + gsoap/stdsoap2.h | 3 +-- + 2 files changed, 1 insertion(+), 4 deletions(-) + +Index: gsoap-2.8.22/gsoap/stdsoap2.cpp +=================================================================== +--- gsoap-2.8.22.orig/gsoap/stdsoap2.cpp ++++ gsoap-2.8.22/gsoap/stdsoap2.cpp +@@ -1547,7 +1547,6 @@ soap_get0(struct soap *soap) + #endif + + /******************************************************************************/ +-#ifdef WITH_LEAN + #ifndef PALM_1 + soap_wchar + soap_get1(struct soap *soap) +@@ -1556,7 +1555,6 @@ soap_get1(struct soap *soap) + return (unsigned char)soap->buf[soap->bufidx++]; + } + #endif +-#endif + + /******************************************************************************/ + #ifndef PALM_1 +Index: gsoap-2.8.22/gsoap/stdsoap2.h +=================================================================== +--- gsoap-2.8.22.orig/gsoap/stdsoap2.h ++++ gsoap-2.8.22/gsoap/stdsoap2.h +@@ -2344,11 +2344,10 @@ extern SOAP_NMAC struct Namespace namesp + + #ifndef WITH_LEAN + # define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) +-# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) + #else + soap_wchar soap_get0(struct soap*); +-soap_wchar soap_get1(struct soap*); + #endif ++soap_wchar soap_get1(struct soap*); + + #define SOAP_XSTRINGIFY(s) SOAP_STRINGIFY(s) + #define SOAP_STRINGIFY(s) #s diff --git a/gsoap-allocator.diff b/gsoap-allocator.diff index 39560d8..462d19b 100644 --- a/gsoap-allocator.diff +++ b/gsoap-allocator.diff @@ -6,7 +6,7 @@ Index: gsoap-2.8.22/gsoap/stdsoap2.cpp =================================================================== --- gsoap-2.8.22.orig/gsoap/stdsoap2.cpp +++ gsoap-2.8.22/gsoap/stdsoap2.cpp -@@ -7256,7 +7256,13 @@ SOAP_FMAC1 +@@ -7254,7 +7254,13 @@ SOAP_FMAC1 struct soap* SOAP_FMAC2 soap_versioning(soap_new)(soap_mode imode, soap_mode omode) @@ -21,7 +21,7 @@ Index: gsoap-2.8.22/gsoap/stdsoap2.cpp if (soap) soap_versioning(soap_init)(soap, imode, omode); return soap; -@@ -8983,7 +8989,14 @@ SOAP_FMAC1 +@@ -8981,7 +8987,14 @@ SOAP_FMAC1 struct soap* SOAP_FMAC2 soap_copy(const struct soap *soap) diff --git a/gsoap.changes b/gsoap.changes index 5da39ee..74edc97 100644 --- a/gsoap.changes +++ b/gsoap.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 28 19:06:05 UTC 2016 - jengelh@inai.de + +- add gsoap-00-builtsource.diff, gsoap-03-seqpoint.diff to fix + more compiler warnings + ------------------------------------------------------------------- Tue Jun 2 11:19:46 UTC 2015 - jengelh@inai.de diff --git a/gsoap.spec b/gsoap.spec index 2382515..bb683c2 100644 --- a/gsoap.spec +++ b/gsoap.spec @@ -1,7 +1,7 @@ # # spec file for package gsoap # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,10 +29,12 @@ Url: http://gsoap2.sf.net/ Source: gsoap-%version.tar.xz Source2: sanitize_source.sh Patch13: gsoap-automake1_13.diff +Patch0: gsoap-00-builtsource.diff Patch1: gsoap-01-sharedlibs.diff Patch2: gsoap-02-typepuns.diff -Patch3: gsoap-mindeflateratio.diff -Patch4: gsoap-allocator.diff +Patch3: gsoap-03-seqpoint.diff +Patch4: gsoap-mindeflateratio.diff +Patch5: gsoap-allocator.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -93,8 +95,8 @@ symlinks for libgsoap. %prep %setup -q cmp gsoap/stdsoap2.cpp gsoap/stdsoap2.c -%patch -P 13 -P 1 -P 2 -P 3 -P 4 -p1 -cp gsoap/stdsoap2.cpp gsoap/stdsoap2.c +%patch -P 13 -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -p1 +ln -fs stdsoap2.cpp stdsoap2.c %build # Rebuild configure - fix that utterly long mktime test.