IBM Support

PI84709: MISRA COMPLIANTSCHEME PROPERTY AFFECTS OTHER MISRA ISSUES IF IT IS SET ON CLASS.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Customer found that violates the MISRA Rule if it is set on
    class to automatically generate code.
    The violate rule is that if there is "else if" code there must
    be "else", but no "else" code.
    Misra CompliantScheme property affects other MISRA issues if it
    is set on class,
    and this("else if" generation) case it fails on Class level.
    
    Please refer attached sample project and sample code is as
    below.
    
    -----------------------------------------------------------
    + Current
    
    IOxfReactive::TakeEventStatus CLASS_NAME::FUNCTION_NAME()
    {
        if(IS_EVENT_TYPE_OF(EVENT1)
        {
            #CODE1
        }
        else if(IS_EVENT_TYPE_OF(EVENT2)
        {
            #CODE2
        }
    }
    
    + TO-BE
    
    IOxfReactive::TakeEventStatus CLASS_NAME::FUNCTION_NAME()
    {
        if(IS_EVENT_TYPE_OF(EVENT1)
        {
            #CODE1
        }
        else if(IS_EVENT_TYPE_OF(EVENT2)
        {
            #CODE2
        }
        else
        {
            // do nothing
        }
    }
    -----------------------------------------------------------
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody                                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * MISRA COMPLIANT SCHEME PROPERTY DOESN'T AFFECT OTHER MISRA   *
    * ISSUES IF IT IS SET ON CLASS.                                *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • The problem is fixed. MisraCompliantScheme property affects code
    generation if it is overridden on separate class. In this case
    "else if" statement is replaced with "else {...}" statement.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI84709

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    750

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-07-19

  • Closed date

    2017-12-04

  • Last modified date

    2017-12-04

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R750 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
18 October 2021