Apache OpenOffice (AOO) Bugzilla – Issue 124361
Eliminate some warnings in sc/
Last modified: 2017-05-20 10:44:28 UTC
Compiling module sc/ produces a lot of annoying warnings, some in system header files (on Windows), some in sc/ files.
One of the warnings is C4555. First lines look like this: warning C4555: expression has no effect; expected expression with side-effect C:\PROGRA~2\MICROS~1.0\VC\include\../../VC/include/list(1126) : while compiling class template member function 'void This seems to be triggered by the hash_map wrapper in stlport/. The positive aspect is that this allows us to temporarily turn off this particular warning.
"af" committed SVN revision 1574415 into trunk: 124361: Avoid MSVC warning 4555 while including unordered_map.
Using #pragma warning(push) #pragma warning(disable:4555) #include ... #pragma warning(pop) to temporarly disable warning 4555. Windows only.
Another warning that is both annoying and easy to fix is triggered in ScSingleRefData::InitMembers(). Because it is an inline method the warning is triggered every time the refdata.hxx header is included, which is quite often. It uses multiple assignments in one statement: nCol = nRow = nTab = nRelCol = nRelRow = nRelTab = 0; The warning is triggered because the variables are not ordered properly and one of the SCROW (defined as sal_Int32) is assigned to one of the SCCOL (defined as sal_Int16) objects. To avoid the warning and improve readability I turned the statement into three, one for each type. Better yet would probably be to do the initialization in the (missing) constructor.
"af" committed SVN revision 1574449 into trunk: 124361: Avoid warning by not assigning from sal_Int32 to sal_Int16.
Repeated the fix described in comments 1-3 for stlport/systemstl/list.
"af" committed SVN revision 1574487 into trunk: 124361: Avoid MSVC warning 4555 while including list.
"af" committed SVN revision 1575927 into trunk: i124361: Removed some warnings from sc.
"af" committed SVN revision 1575930 into trunk: i124361: Enable exception support for all sc source files.
"af" committed SVN revision 1575931 into trunk: i124361: Removed unreachable code to avoid warnings.
Revision 1575927 and revision 1575931 are some minor changes that remove a bunch of warnings, mostly unreachable code and possible data loss when converting data types. Revision 1575930 enables exception support for all source files of sc.
"af" committed SVN revision 1575948 into trunk: i124361: Removed empty and unused makefiles.
Reset the assignee to the default "issues@openoffice.apache.org".