summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch')
-rw-r--r--meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch b/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
new file mode 100644
index 000000000..dae583d85
--- /dev/null
+++ b/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch
@@ -0,0 +1,47 @@
1example21.cpp: remove deprecated code
2
3The deprecated code was no longer used, so remove it to avoid
4compiling failure with -Werror=unused-function
5...
6| example21.cpp:51:8: error: 'size_t {anonymous}::readData(char*,
7size_t, size_t)' defined but not used [-Werror=unused-function]
8| size_t readData(char *buffer, size_t size, size_t nitems)
9...
10
11Upstream-Status: Pending
12
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14---
15 examples/example21.cpp | 17 -----------------
16 1 file changed, 17 deletions(-)
17
18diff --git a/examples/example21.cpp b/examples/example21.cpp
19--- a/examples/example21.cpp
20+++ b/examples/example21.cpp
21@@ -39,23 +39,6 @@
22 #include <curlpp/Options.hpp>
23 #include <curlpp/Exception.hpp>
24
25-/*
26- anonymous namespace to prevent name clash in case other examples using the same global entities
27- would be compiled in the same project
28-*/
29-namespace
30-{
31-
32-char *data = NULL;
33-
34-size_t readData(char *buffer, size_t size, size_t nitems)
35-{
36- strncpy(buffer, data, size * nitems);
37- return size * nitems;
38-}
39-
40-} // namespace
41-
42 int main(int argc, char *argv[])
43 {
44 if(argc != 3) {
45--
461.9.1
47