Bug 99694 - VSC2015 warning C4334 in gifread.cxx and vbainputstream.cxx
Summary: VSC2015 warning C4334 in gifread.cxx and vbainputstream.cxx
Status: RESOLVED MOVED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha1
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-05-05 15:12 UTC by Mark_T2016
Modified: 2016-05-06 14:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Modified gifread.cxx (26.06 KB, text/x-csrc)
2016-05-05 15:12 UTC, Mark_T2016
Details
Modified vbainputstream.cxx (7.36 KB, text/plain)
2016-05-05 15:15 UTC, Mark_T2016
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark_T2016 2016-05-05 15:12:48 UTC
Created attachment 124867 [details]
Modified gifread.cxx

Sorry to post as bug rather than submit change via gerrit, I haven't tried to register yet until I get some confidence I can build x64 on Windows with VSC2015.

Warning treated as Error by Visual Studio Community 2015, result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

The result of 32-bit shift was implicitly converted to 64-bits, and the compiler suspects that a 64-bit shift was intended. To resolve this warning, either use 64-bit shift, or explicitly cast the shift result to 64-bit.

This prevents compiling x64 from source, but the same can be compiled OK for x86.

Following Microsoft recommendation :-
https://msdn.microsoft.com/en-us/library/ke55d167.aspx

Modified attached copies.

D:\lode\dev\x64\vcl\source\filter\igif\gifread.cxx
at line 251
ReadPaletteEntries( &aGPalette, 1i64 << ( ( nRF & 7 ) + 1 ) );

at line 462
ReadPaletteEntries( pPal, 1i64 << ( (nFlags & 7 ) + 1 ) );

D:\lode\dev\x64\oox\source\ole\vbainputstream.cxx
at line 160
while( static_cast< size_t >( 1i64 << nBitCount ) < maChunk.size() ) ++nBitCount;
Comment 1 Mark_T2016 2016-05-05 15:15:55 UTC
Created attachment 124868 [details]
Modified vbainputstream.cxx

Added modified copy of vbainputstream.cxx, as I seem unable to add two attachments to original bug report.
Comment 2 Mark_T2016 2016-05-05 16:21:56 UTC
Using the following autogen.input

--enable-64-bit
--enable-pch
--disable-ccache
--with-visual-studio=2015
--disable-firebird-sdbc
--disable-cve-tests
Comment 3 Julien Nabet 2016-05-05 17:30:39 UTC
Just for information, you can discuss about patch, building problem here:
http://nabble.documentfoundation.org/Dev-f1639786.html
or on IRC

This link may help for having a general devs' view:
https://wiki.documentfoundation.org/Development
Comment 4 Buovjaga 2016-05-06 14:21:46 UTC
Yep, let's consider this moved to IRC/ML :)