bugCERTI - Bugs: bug #23022, return local variable

 
 

bug #23022: return local variable

Submitted by:  Matteo Boccafoli <matteo>
Submitted on:  Tue 22 Apr 2008 06:48:17 PM UTC  
 
Category: CERTISeverity: 3 - Normal
Item Group: Compilation errorStatus: Fixed
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: CVS
Reproducibility: Every TimeFixed Release: 3.3.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 26 Apr 2008 03:24:28 PM UTC, comment #2:

Merge is done.
Current CVS HEAD should not have this problem.
There still remains usage of char*
we may fix this progressively

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 22 Apr 2008 07:32:18 PM UTC, comment #1:

Hi Matteo,

Thank you for the report and the patch.
This warning/error should disappear soon
when the work on heterogeneous handling
https://savannah.nongnu.org/task/?6910
is merged to HEAD.

During this change I did change many char* to
std::string in order to avoid many drawback
of C char*.

Thus, I won't merge your patch but I will
close as soon as CVS contains no warning code :=)

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 22 Apr 2008 06:48:17 PM UTC, original submission:

g++ (GCC) 4.2.3

OwnershipManagement.cc: In member function ‘const char* certi::rtia::OwnershipManagement::attributeOwnedByFederate(certi::ObjectHandle, certi::AttributeHandle, certi::TypeException&)’:
OwnershipManagement.cc:66: warning: address of local variable ‘rep’ returned

Potential patch using std::string for
/OwnershipManagement.cc/3.12/Fri Feb 22 11:34:31 2008//
/OwnershipManagement.hh/3.6/Tue May 18 13:18:52 2004//
/RTIA_federate.cc/3.70/Tue Apr 1 13:00:46 2008//

Matteo Boccafoli <matteo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15506:  char.patch added by matteo (2KiB - application/octet-stream - patch with std::string)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by matteo (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Jul 2008 08:58:17 AM UTCerkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNextRelease=>3.3.0
    Sat 26 Apr 2008 03:24:28 PM UTCerkStatusIn Progress=>Ready For Test
    Wed 23 Apr 2008 11:00:54 AM UTCerkStatusNone=>In Progress
      Assigned toNone=>erk
      Fixed ReleaseUnknown=>NextRelease
    Tue 22 Apr 2008 06:48:17 PM UTCmatteoAttached File-=>Added char.patch, #15506

    Back to the top


    Powered by Savane 3.1-cleanup1