IBM Support

PI66964: IMPROVE SXF AND MICROSOFT ADAPTER TO COMPLY WITH MISRA C++ 2008

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Many MISRA violations were reported from SXF static code and
    Microsoft Adapter code by QAC
    
    
    ==============================
    List of MISRA violation - SXF static code
    Rule number: description
    filename - number
    ------------------------------------------------------
    0-1-7: The return value of this function call is not used.
    OMProtected.cpp - 89
    OMReactive.cpp - 340
    OMThread.cpp - 36, 67, 102
    oxf.cpp - 183, 184
    OMTimeoutPool.cpp - 34
    
    0-1-8: This function returning void has no external side
    effects.
    OMReactive.h - 129
    
    0-3-2: This output parameter value is not subsequently checked.
    OMProtected.cpp - 89
    OMThread.cpp - 36, 67
    OMGenericEventQueue.cpp - 39
    OMTimeoutPool.cpp - 34
    
    2-7-3: This C++ style comment, comments out source code.
    OMProtected.h - 30
    OMThread.cpp - 31, 44
    
    2-10-2: This name hides a similar kind of declaration.
    OMReactive.h - 61
    OMThread.cpp - 223
    
    3-4-1: The declaration of object 'mem' can be moved to this
    nested scope.
    oxf.cpp - 44
    
    5-0-3	This complex expression is implicitly converted to a
    different essential type.
    oxf.cpp - 153, 184
    
    5-0-4	This is an implicit conversion between signed and unsigned
    integer types.
    OMGenericEventQueue.cpp - 31, 36, 95, 104, 147, 227, 253
    
    5-0-15: This is applying the subscript operator to a pointer
    value.
    OMMainThread.cpp - 90, 93
    OMGenericEventQueue.cpp - 36, 71, 78, 92, 93, 129, 132, 148,
    209, 212, 228, 256
    
    5-2-3: This expression is a downcast, a polymorphic base class
    is cast to a derived class.
    OMThread.cpp - 301
    
    5-2-5: This is a const_cast expression.
    OMGenericEventQueue.cpp - 256
    
    6-3-1: This 'for' statement does not contain a block.
    OMGenericEventQueue.cpp - 36
    
    6-5-2: While loop counter 'aTimeout/mem/working/head/current' of
    fundamental type not compared with relational operator.
    OMMainThread.cpp - 57
    oxf.cpp - 86
    OMGenericEventQueue.cpp - 69, 146, 226
    OMTimeoutPool.cpp - 96, 208
    
    6-5-4: While loop counter 'aTimeout/mem/working/head/current' of
    fundamental type modified not with ++,--,+= or -=.
    OMMainThread.cpp - 57
    oxf.cpp - 86
    OMGenericEventQueue.cpp - 69, 146, 226
    OMTimeoutPool.cpp - 96, 208
    
    6-5-5: The starting value of the scalar type control variable
    'I' is not set in the initialization expression.
    OMMainThread.cpp - 89
    
    7-1-1: 'dest/arrayOfTimeoutsPtr/evReal/evNull or etc' is not
    modified by the function.
    OMMainThread.cpp - 59, 88
    OMReactive.cpp - 188, 189, 336, 499, 503, 591
    OMThread.cpp - 135, 202, 203, 224, 286, 289, 301
    oxf.cpp - 189, 202
    OMGenericEventQueue.cpp - 31
    OMTimeoutPool.cpp - 200
    
    7-3-1: The type name 'Rhp_char_t/Rhp_char_pt/Rhp_int8_t or etc'
    is in the global scope.
    MISRA_Cpp_TypesPkg.h - 23, 25, 30, 35, 40, 42, 47, 52, 57, 59,
    61, 63, 65, 66
    OMEventQueue.h - 19, 23, 35
    OMGuard.h - 23
    OMProtected.h - 24
    OMReactive.h - 24, 26
    OMStartBehaviorEvent.h - 23
    OMTimeout.h - 17, 19, 21, 30
    
    7-5-2: This is assigning the address of an object to a pointer
    that may have greater lifetime.
    OMProtected.cpp - 52
    OMReactive.cpp - 619
    
    8-4-4: Function not used in call and not preceded by '&'
    operator.
    OMThread.cpp - 36, 67
    oxf.cpp - 150, 183
    
    9-3-3: This non static member function does not access any
    member data.
    OMReactive.h - 129
    OMReactive.cpp - 482
    
    
    10-3-1: Introducting virtual function without the pure
    specifier.
    OMEvent.h - 45, 62
    OMMainThread.h - 54
    OMReactive.h - 72, 76, 104, 169, 173, 183, 187, 194, 200, 205,
    221
    OMThread.h - 58, 72, 99, 115
    
    15-5-1	The code in the destructor may throw an exception.
    OMGuard.cpp - 46
    OMProtected.cpp - 70
    OMReactive.cpp - 334, 340
    
    
    ==============================
    List of MISRA violation - Microsoft Adapter
    ------------------------------------------------------
    7-3-1: The type name 'OMEvent' is in the global scope.
    OMOSSpecific.h - 17, 19, 21, 29
    oxf.h - 18, 21, 39, 42, 61
    
    15-5-3: This function call in namespace scope may cause the
    program to terminate.
    oxf.h - 91
    
    16-2-2: Macro may be used as a literal.
    oxf.h - 32
    
    
    
    ==============================
    FYI, you can download an excel file which has the same list of
    MISRA violation
    https://l2l3-cmn-rtc.ratl.swg.usma.ibm.com:9443/ccm/service/com.
    ibm.team.workitem.common.internal.rest.IAttachmentRestService/it
    emName/com.ibm.team.workitem.Attachment/118427
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody users                                               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Improve SXF and Microsoft Adapter to comply with MISRA C++   *
    * 2008                                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Fixed in Rhapsody 8.2 - All listed violations are fixed but
    2-10-2.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI66964

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    814

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-03

  • Closed date

    2016-12-05

  • Last modified date

    2016-12-05

  • 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

  • R814 PSN

       UP



Document information

More support for: Rational Rhapsody

Software version: 8.1.4

Reference #: PI66964

Modified date: 05 December 2016