Apache OpenOffice (AOO) Bugzilla – Issue 13256
Remove warnings from the sal directory
Last modified: 2003-07-31 02:27:28 UTC
There are a few warnings in sal. a) There is a concat ## symbol that is not required and it does not generate a new macro symbol for the preprocessor. It is simply removed as it is unnessecary. b) There are a couple of 'static' on structure declarations. Declarations do not have storage. c) There are a couple of const's being discarded. This upgrades some things to const to remove that error.
Created attachment 5561 [details] patch file that corrects described warnings.
I commited osl/unx/system.h to 20030412. mh->sb: please review the rest.
Applied the rest of the patches, except for changing rtl_uString_getStr(rtl_uString *) to rtl_uString_getStr(rtl_uString * const) in inc/rtl/ustring.h and rtl/source/strtmp.c. What warning would that change suppress?
set target
There were a few fields that we defined with const and being passed to this routine. Adding the const to the function definition was allowable given the actions of the routine and it removed these implied removal of cost messages. Bit I could not really figure out is the how the const was allowed to be removed at all.
I think I still don't understand this. What we effectively have is struct rtl_uString { sal_Unicode buffer[1]; ... } sal_Unicode * rtl_uString_getStr(rtl_uString * str) { return str->buffer; } How does changing this to (uppercase for clarity) sal_Unicode * rtl_uString_getStr(rtl_uString * CONST str) { return str->buffer; } help? Or do you mean that we should overload that function sal_Unicode * rtl_uString_getStr(rtl_uString * str) { return str->buffer; } sal_Unicode CONST * rtl_uString_getStr_CONST(rtl_uString CONST * str) { return str->buffer; } (Or are the C const semantics so much different from the C++ const semantics that I talk just nonsense?)
...got relocated to CWS ooo20030412.
Please check on ooo20030412 and set to verified.
UNable to verify. The 0412 tag is unbuildable at present in unrelated problems.
Too late for beta2, re-targeted to 1.1 RC.
This patch has been applied and only leave a few warnings left to be addressed.
Verified with fresh build.
Closing