Drop patch g++-11.patch, present upstream.
Debian Janitor
2 years ago
14 | 14 |
[ Debian Janitor ]
|
15 | 15 |
* New upstream snapshot.
|
16 | 16 |
* Drop patch signed-char.patch, present upstream.
|
|
17 |
* Drop patch g++-11.patch, present upstream.
|
17 | 18 |
|
18 | 19 |
-- gregor herrmann <gregoa@debian.org> Fri, 23 Jul 2021 04:29:30 -0000
|
19 | 20 |
|
0 | |
Description: Fix build failure with GCC-11
|
1 | |
The failure:
|
2 | |
.
|
3 | |
mmfile.cxx: In member function ‘bool mimetic::MMFile::map()’:
|
4 | |
mmfile.cxx:60:14: error: ordered comparison of pointer with integer zero (‘char*’ and ‘int’)
|
5 | |
60 | if(m_beg > 0)
|
6 | |
| ~~~~~~^~~
|
7 | |
.
|
8 | |
https://gcc.gnu.org/gcc-11/porting_to.html says:
|
9 | |
.
|
10 | |
GCC 11 now issues a diagnostic for ordered comparisons of pointers against
|
11 | |
constant integers. Commonly this is an ordered comparison against NULL or
|
12 | |
0. These should be equality comparisons, not ordered comparisons.
|
13 | |
Origin: upstream
|
14 | |
Bug-Debian: https://bugs.debian.org/984235
|
15 | |
Applied: bf84940f9021950c80846e6b1a5f8b0b55991b00
|
16 | |
Reviewed-by: gregor herrmann <gregoa@debian.org>
|
17 | |
Last-Update: 2021-04-13
|
18 | |
|
19 | |
--- a/mimetic/os/mmfile.cxx
|
20 | |
+++ b/mimetic/os/mmfile.cxx
|
21 | |
@@ -57,7 +57,7 @@
|
22 | |
bool MMFile::map()
|
23 | |
{
|
24 | |
m_beg = (char*) mmap(0, m_st.st_size, PROT_READ, MAP_SHARED,m_fd,0);
|
25 | |
- if(m_beg > 0)
|
26 | |
+ if(m_beg != MAP_FAILED)
|
27 | |
{
|
28 | |
m_end = m_beg + m_st.st_size;
|
29 | |
#if HAVE_MADVISE
|