textproc/gmetadom: Fix build with Clang 6
./../include/GdomeSmartDOMTraits.hh:101:25: error: non-constant-expression cannot be narrowed from type 'std::__1::char_traits<unsigned short>::int_type' (aka 'unsigned long') to 'std::__1::char_traits<unsigned short>::char_type' (aka 'unsigned short') in initializer list [-Wc++11-narrowing]
char_type __r = { __c };
^~~
http://beefy8.nyi.freebsd.org/data/head-armv6-default/p475340_s336728/logs/gmetadom-0.2.6_4.log
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
./../include/GdomeSmartDOMTraits.hh:101:25: error: non-constant-expression cannot be narrowed from type 'std::__1::char_traits<unsigned short>::int_type' (aka 'unsigned long') to 'std::__1::char_traits<unsigned short>::char_type' (aka 'unsigned short') in initializer list [-Wc++11-narrowing]
|
||||
char_type __r = { __c };
|
||||
^~~
|
||||
|
||||
--- src/gdome_cpp_smart/include/GdomeSmartDOMTraits.hh.orig 2018-07-29 11:48:09 UTC
|
||||
+++ src/gdome_cpp_smart/include/GdomeSmartDOMTraits.hh
|
||||
@@ -98,7 +98,7 @@ namespace std {
|
||||
static char_type
|
||||
to_char_type(const int_type& __c)
|
||||
{
|
||||
- char_type __r = { __c };
|
||||
+ char_type __r = { static_cast<char_type>(__c) };
|
||||
return __r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user