aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
blob: dcde83e8a411d3073505a54636205d12385bfaeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
fixes the below error

| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)':
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
|   308 |           numMethods++;
|       |           ^~~~~~~~~~
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
|   318 |         numMethods++;


use unsigned instead of bool
Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>

Upstream-Status: Pending
Index: p7zip_16.02/CPP/7zip/Archive/Wim/WimHandler.cpp
===================================================================
--- p7zip_16.02.orig/CPP/7zip/Archive/Wim/WimHandler.cpp
+++ p7zip_16.02/CPP/7zip/Archive/Wim/WimHandler.cpp
@@ -298,7 +298,7 @@ STDMETHODIMP CHandler::GetArchivePropert
 
       AString res;
 
-      bool numMethods = 0;
+      unsigned numMethods = 0;
       for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++)
       {
         if (methodMask & ((UInt32)1 << i))