mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Avoid warnings with gcc 9
The warning about unneeded std::move can be solved by conditioning on C++14 mode. The warnings about deprecated copy is harder, so we disable it for now. We will be able to fix our part, but Qt triggers it a lot too.
This commit is contained in:
parent
03eadb1a66
commit
134f3aedaf
@ -404,8 +404,11 @@ if test x$GXX = xyes; then
|
|||||||
fi
|
fi
|
||||||
dnl Warnings are for preprocessor too
|
dnl Warnings are for preprocessor too
|
||||||
if test x$enable_warnings = xyes ; then
|
if test x$enable_warnings = xyes ; then
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
|
case $gxx_version in
|
||||||
fi
|
9.*) AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra -Wno-deprecated-copy";;
|
||||||
|
*) AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra";;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
case $gxx_version in
|
case $gxx_version in
|
||||||
2.*|3.*|4.@<:@0-6@:>@) AC_MSG_ERROR([gcc >= 4.7 is required]);;
|
2.*|3.*|4.@<:@0-6@:>@) AC_MSG_ERROR([gcc >= 4.7 is required]);;
|
||||||
esac
|
esac
|
||||||
@ -874,7 +877,7 @@ AC_DEFUN([MSYS_AC_CANONICAL_PATH],
|
|||||||
dnl this is used by the macro blow to general a proper config.h.in entry
|
dnl this is used by the macro blow to general a proper config.h.in entry
|
||||||
m4_define([LYX_AH_CHECK_DECL],
|
m4_define([LYX_AH_CHECK_DECL],
|
||||||
[AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1),
|
[AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1),
|
||||||
[Define if you have the prototype for function `$1'])])
|
[Define if you have the prototype for function `$1'])])dnl`
|
||||||
|
|
||||||
dnl Check things are declared in headers to avoid errors or warnings.
|
dnl Check things are declared in headers to avoid errors or warnings.
|
||||||
dnl Called like LYX_CHECK_DECL(function, header1 header2...)
|
dnl Called like LYX_CHECK_DECL(function, header1 header2...)
|
||||||
@ -894,7 +897,7 @@ done])
|
|||||||
dnl this is used by the macro below to generate a proper config.h.in entry
|
dnl this is used by the macro below to generate a proper config.h.in entry
|
||||||
m4_define([LYX_AH_CHECK_DEF],
|
m4_define([LYX_AH_CHECK_DEF],
|
||||||
[AH_TEMPLATE(AS_TR_CPP(HAVE_DEF_$1),
|
[AH_TEMPLATE(AS_TR_CPP(HAVE_DEF_$1),
|
||||||
[Define to 1 if `$1' is defined in `$2'])])
|
[Define to 1 if `$1' is defined in `$2'])])dnl'
|
||||||
|
|
||||||
dnl Check whether name is defined in header by using it in codesnippet.
|
dnl Check whether name is defined in header by using it in codesnippet.
|
||||||
dnl Called like LYX_CHECK_DEF(name, header, codesnippet)
|
dnl Called like LYX_CHECK_DEF(name, header, codesnippet)
|
||||||
|
@ -74,7 +74,11 @@ Changer MetricsBase::changeFontSet(string const & name)
|
|||||||
&& ((isTextFont(oldname) && oldcolor != Color_foreground)
|
&& ((isTextFont(oldname) && oldcolor != Color_foreground)
|
||||||
|| (isMathFont(oldname) && oldcolor != Color_math)))
|
|| (isMathFont(oldname) && oldcolor != Color_math)))
|
||||||
font.setColor(oldcolor);
|
font.setColor(oldcolor);
|
||||||
|
#if __cplusplus >= 201402L
|
||||||
|
return rc;
|
||||||
|
#else
|
||||||
return move(rc);
|
return move(rc);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user