Issue 13256 - Remove warnings from the sal directory
Summary: Remove warnings from the sal directory
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 644
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: foskey
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-10 13:51 UTC by foskey
Modified: 2003-07-31 02:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch file that corrects described warnings. (4.38 KB, patch)
2003-04-10 13:52 UTC, foskey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description foskey 2003-04-10 13:51:10 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.
Comment 1 foskey 2003-04-10 13:52:02 UTC
Created attachment 5561 [details]
patch file that corrects described warnings.
Comment 2 Martin Hollmichel 2003-04-11 15:47:49 UTC
I commited osl/unx/system.h to 20030412.

mh->sb: please review the rest.
Comment 3 Stephan Bergmann 2003-04-15 13:58:58 UTC
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?
Comment 4 Stephan Bergmann 2003-04-15 14:01:18 UTC
set target
Comment 5 foskey 2003-04-15 14:04:40 UTC
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.
Comment 6 Stephan Bergmann 2003-04-15 16:03:57 UTC
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?)
Comment 7 Stephan Bergmann 2003-04-23 14:13:40 UTC
...got relocated to CWS ooo20030412.
Comment 8 Stephan Bergmann 2003-04-24 15:18:20 UTC
Please check on ooo20030412 and set to verified.
Comment 9 foskey 2003-04-27 14:28:17 UTC
UNable to verify.  The 0412 tag is unbuildable at present in unrelated
problems.
Comment 10 michael.bemmer 2003-05-06 16:10:55 UTC
Too late for beta2, re-targeted to 1.1 RC.
Comment 11 foskey 2003-05-22 13:24:24 UTC
This patch has been applied and only leave a few warnings left to be
addressed.
Comment 12 foskey 2003-05-22 13:24:53 UTC
Verified with fresh build.
Comment 13 foskey 2003-07-31 02:27:28 UTC
Closing