geometer / FBReader

Official FBReader C++ project repository
http://www.fbreader.org/
540 stars 170 forks source link

gcc6: OleStorage.cpp error narrowing conversion from 'int' to 'char #289

Open DAP-DarkneSS opened 8 years ago

DAP-DarkneSS commented 8 years ago

Distro: openSUSE Factory Compiler: gcc 6.1 Archs: i586, x86_64

[ 390s] Compiling DocBookReader.o ...which: no ccache in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin) [ 390s] In file included from /home/abuild/rpmbuild/BUILD/fbreader-0.99.4/fbreader/../zlibrary/core/include/ZLFile.h:26:0, [ 390s] from DocStreams.h:23, [ 390s] from DocStreams.cpp:24: [ 390s] /home/abuild/rpmbuild/BUILD/fbreader-0.99.4/fbreader/../zlibrary/core/include/shared_ptr.h: In instantiation of 'void shared_ptr_storage::removeReference() [with T = DocReader]': [ 390s] /home/abuild/rpmbuild/BUILD/fbreader-0.99.4/fbreader/../zlibrary/core/include/shared_ptr.h:178:4: required from 'void shared_ptr::detachStorage() [with T = DocReader]' [ 390s] /home/abuild/rpmbuild/BUILD/fbreader-0.99.4/fbreader/../zlibrary/core/include/shared_ptr.h:208:15: required from 'shared_ptr::~shared_ptr() [with T = DocReader]' [ 390s] DocStreams.cpp:140:62: required from here [ 390s] /home/abuild/rpmbuild/BUILD/fbreader-0.99.4/fbreader/../zlibrary/core/include/shared_ptr.h:147:3: warning: deleting object of polymorphic class type 'DocReader' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor] [ 390s] delete ptr; [ 390s] ^~ [ 390s] OK [ 390s] Compiling DocPlugin.o ...which: no ccache in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin) [ 391s] OK [ 391s] Compiling OleStorage.o ...which: no ccache in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin) [ 391s] OK [ 392s] Compiling OleMainStream.o ...OleStorage.cpp: In member function 'bool OleStorage::init(shared_ptr, std::size_t)': [ 392s] OleStorage.cpp:62:83: error: narrowing conversion of '208' from 'int' to 'char' inside { } [-Wnarrowing] [ 392s] static const char OLE_SIGN[] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0}; [ 392s] ^ [ 392s] OleStorage.cpp:62:83: error: narrowing conversion of '207' from 'int' to 'char' inside { } [-Wnarrowing] [ 392s] OleStorage.cpp:62:83: error: narrowing conversion of '224' from 'int' to 'char' inside { } [-Wnarrowing] [ 392s] OleStorage.cpp:62:83: error: narrowing conversion of '161' from 'int' to 'char' inside { } [-Wnarrowing] [ 392s] OleStorage.cpp:62:83: error: narrowing conversion of '177' from 'int' to 'char' inside { } [-Wnarrowing] [ 392s] OleStorage.cpp:62:83: error: narrowing conversion of '225' from 'int' to 'char' inside { } [-Wnarrowing] [ 392s] OK [ 392s] make[1]: *\ [/home/abuild/rpmbuild/BUILD/fbreader-0.99.4/fbreader/../makefiles/subdir.mk:14: OleStorage.o] Error 1

ghost commented 8 years ago

I uploaded a patch here: https://bugs.gentoo.org/show_bug.cgi?id=592588