OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0001010OMNeT++command line toolspublic2017-05-04 22:412017-12-22 19:59
paolinux 
 
lowminoralways
newopen 
x86Ubuntu17.04
5.1 
 
0001010: nedtool: the getDisplayString() method in auto-generated messages is not marked as override
If the message definition contains the display string, e.g.,

message Job
{
    string displayString = "i=msg/package_s,kind";
    //...
}

the *_m.h auto-generated file contains the following method definition

virtual const char * getDisplayString() const;

which triggers the following warning with clang

 warning: 'getDisplayString' overrides a member function but is not marked override'
      [-Winconsistent-missing-override]
    virtual const char * getDisplayString() const;
As a temporary workaround, the warning can be disabled by adding

 -Wno-inconsistent-missing-override

in CFLAGS_DEBUG and CFLAGS_RELEASE in Makefile.inc
No tags attached.
patch override.patch (1,017) 2017-12-22 19:58
https://dev.omnetpp.org/bugs/file_download.php?file_id=209&type=bug
Issue History
2017-05-04 22:41paolinuxNew Issue
2017-12-22 19:58paolinuxNote Added: 0001351
2017-12-22 19:58paolinuxFile Added: override.patch

Notes
(0001351)
paolinux   
2017-12-22 19:58   
A cleaner workaround (until this gets properly fixed) is to patch the nedtool to add the override tag when generating the message class. I've attached a quick and dirty patch for the latest release (5.2.1)