Development/Common Warnings

From The Document Foundation Wiki
Jump to: navigation, search

LibreOffice is a big project and is in majority coded in C++. Errors and bugs are corrected first but it's quite boring to see always the same warnings without knowing what to do for some of them. So here is the goal of this page: give some examples or references to manage them. These examples can be made up or come from real (and they normally be corrected).

1) impress/sd/source/filter/eppt/pptx-epptbase.cxx: In member function 'void PPTWriterBase::exportPPT()': impress/sd/source/filter/eppt/pptx-epptbase.cxx:238:9: error: format '%d' expects type 'int', but argument 2 has type 'sal_uInt32'

The line was like this :

DBG(printf( "call ImplCreateSlide( %d )\n", i));

and has been changed like this :

DBG(printf( "call ImplCreateSlide( %"SAL_PRIuUINT32" )\n", i));

More information is available in section sal_types of Development#Development / Hacking Notes

2) During a compilation, this error can happen sometimes : error <file> not found for example : error ./unxlngi6/misc/8d265a592619166f29c4672ea54812b7-libwpd-0.9.2.unpack not found. This case usually happens when a newer version of an external component is now used.

Normally, has been updated. But, ooo.lst hasn't been update and, above all, the new file hasn't been downloaded. This results with a not found file.

To solve this, just remove ooo.lst then run :

- "./" (regenerates ooo.lst from

- "make fetch" (retrieves the files of the newer versions)

then "make" to keep on the compilation