Issue 14860 - return type mismatch - return by value assigned to reference
Summary: return type mismatch - return by value assigned to reference
Status: CLOSED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: All All
: P1 (highest) Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: ab
QA Contact: Unknown
URL:
Keywords:
Depends on:
Blocks: 13400
  Show dependency tree
 
Reported: 2003-05-25 19:21 UTC by khendricks
Modified: 2003-06-20 14:32 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description khendricks 2003-05-25 19:21:59 UTC
gcc 3.3 now provides error messages when there are return type mismatches 
such as  when a method returns an object by value that is assigned to a refernce which  
is a bug since the reference points to a temporary variable created to hold the return by value. 
 
An occurrence of this type occurred here see ... (fixme?) 
 
Please evaluate the following lines of code and if necessary fix them so that the return by value 
is properly handled. 
 
Thanks 
 
 
eventattacher/source/eventattacher.cxx 
@@ -925,7 
                                reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( 
                                        OUString( RTL_CONSTASCII_USTRINGPARAM( "/" IMPLNAME 
"/UNO/SERVICES") ))); 
 
(fixme?)                Sequence< OUString > & rSNL = 
                                
::comp_EventAttacher::EventAttacherImpl::getSupportedServiceNames_Static(); 
                        const OUString * pArray = rSNL.getConstArray(); 
                        for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
Comment 1 Martin Hollmichel 2003-05-26 09:54:11 UTC
set prio 
Comment 2 hennes.rohling 2003-05-26 10:13:39 UTC
As this is not my code can you please specify the complete path so I
can assign this issue to the correct person. eventattacher is not a
CVS module.
Comment 3 khendricks 2003-05-26 13:30:43 UTC
Hi, 
 
Sorry about that after cvs aliasing it looks like its own module. 
 
Here is was the CVS Repository says: 
 
[kbhend@base1 CVS]$ cat Repository 
util/eventattacher 
 
Hope that helps. 
 
Kevin 
 
 
Comment 4 hennes.rohling 2003-05-27 11:39:01 UTC
hro@ab: Please verify if the component implemented by module
util/eventattacher is really used by OOo.

Just change the definition of rSNL in line 928 to a simple variable
instead of a reference.
Comment 5 ab 2003-06-02 12:48:24 UTC
Done for cws ooo11beta2
Comment 6 sparcmoz 2003-06-03 13:49:21 UTC
This revision 1.3.40.2 prevents the build on gcc-3.3 sparc linux but
it builds ok if i reinstate to 1.3.40.1 eventattacher.cxx

Checking DLL ../unxlngs.pro/lib/check_libevtatt.so ...: ERROR:
../unxlngs.pro/li b/check_libevtatt.so: undefined symbol:
_ZTIN4cppu11OWeakObjectE
dmake:  Error code 1, while making '../unxlngs.pro/lib/libevtatt.so'
Comment 7 sparcmoz 2003-06-03 13:55:34 UTC
sorry, i was wrong - revision 1.3.40.2 is OK for me - (i was confused
by changing -frtti to -fno-rtti at the same time)
Comment 8 Martin Hollmichel 2003-06-10 17:02:54 UTC
retarget.
Comment 9 ab 2003-06-20 14:32:30 UTC
Talked to MH, retargeting was done accidentally. Fix is checked in
both for src641 and srx645 -> close