Skip to contentSkip to conversation

curlpp: fix do_compile failed since gcc upgrade to 4.9

PATCH New Hongxu Jia 1 participant 2 messages Aug 12, 2014

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover curlpp: fix do_compile failed since gcc upgrade to 4.9

The following changes since commit 4d4ab8fd320b58323033c12cf705e7b3ce10d659:

integrate fcgi-2.4.0 and add OML license file (2014-08-10 17:23:22 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-curlpp
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-curlpp

Hongxu Jia (1):
curlpp: fix do_compile failed since gcc upgrade to 4.9

 .../example21.cpp-remove-deprecated-code.patch     | 47 ++++++++++++++++++++++
 .../recipes-support/curlpp/curlpp_0.7.3.bb         |  3 +-
 2 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 curlpp: fix do_compile failed since gcc upgrade to 4.9

The deprecated test code was no longer used, so remove it to avoid compiling failure with -Werror=unused-function
...
| example21.cpp:51:8: error: 'size_t {anonymous}::readData(char*, size_t, size_t)' defined but not used [-Werror=unused-function] | size_t readData(char *buffer, size_t size, size_t nitems)
...

---
 .../example21.cpp-remove-deprecated-code.patch     | 47 ++++++++++++++++++++++
 .../recipes-support/curlpp/curlpp_0.7.3.bb         |  3 +-
 2 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch new file +47 -0
new file mode 100644
index 0000000..dae583d
@@ -0,0 +1,47 @@
+example21.cpp: remove deprecated code
+
+The deprecated code was no longer used, so remove it to avoid
+compiling failure with -Werror=unused-function
+...
+| example21.cpp:51:8: error: 'size_t {anonymous}::readData(char*,
+size_t, size_t)' defined but not used [-Werror=unused-function]
+|  size_t readData(char *buffer, size_t size, size_t nitems)
+...
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ examples/example21.cpp | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/examples/example21.cpp b/examples/example21.cpp
+--- a/examples/example21.cpp
++++ b/examples/example21.cpp
+@@ -39,23 +39,6 @@
+ #include <curlpp/Options.hpp>
+ #include <curlpp/Exception.hpp>
+  
+-/*
+-   anonymous namespace to prevent name clash in case other examples using the same global entities
+-   would be compiled in the same project
+-*/
+-namespace
+-{
+-
+-char *data = NULL;
+-
+-size_t readData(char *buffer, size_t size, size_t nitems)
+-{
+-  strncpy(buffer, data, size * nitems);
+-  return size * nitems;
+-}
+-
+-} // namespace
+-
+ int main(int argc, char *argv[])
+ {
+   if(argc != 3) {
+-- 
+1.9.1
+
meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb +1 -2
index d24c958..48f5178 100644
@@ -4,12 +4,11 @@ SECTION = "console/network"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-PNBLACKLIST[curlpp] = "BROKEN: since gcc upgrade to 4.9, error: 'size_t {anonymous}::readData(char*, size_t, size_t)' defined but not used [-Werror=unused-function]"
-
 DEPENDS = "curl boost"
 DEPENDS_class-native = "curl-native"
 
 SRC_URI = "http://curlpp.googlecode.com/files/curlpp-${PV}.tar.gz \
+           file://example21.cpp-remove-deprecated-code.patch \
 	"
 
 SRC_URI[md5sum] = "ccc3d30d4b3b5d2cdbed635898c29485"
Signature · 1 line
1.9.1