Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rul 2.5: Definition of a project and unused code
This questions would rather belong to a specific forum for discussions of glossary terms but I could not find the appropriate section. My original question deals with the definition of "Project". I'll use example of unused code, but this issue could also be discussed in a context of other rules.

Let's say, I build an executable that makes use of a library, whose headers, say, contain a certain macro definition. This macro is not used anywhere in the source code of the executable directly, but it is used somewhere inside the library.

Is this situation compliant with Rule 2.5?

What if this library is actually a third party library whose source code is not available? Should the library itself be MISRA-compliant for the using code to be compliant (and thus definition of a "project" should also contain libraries and not only an executables)?
The term "project" applies to all code in the executable(s), including third party libraries. However the project management may choose to handle libraries in a different manner to the source code. This is discussed in Section 6.7.

MISRA published a document in April 2016, which includes a more detailed discussion of this topic.
"MISRA Compliance:2016 Achieving compliance with MISRA Coding Guidelines"
The document can be found by clicking on the above link or by looking either in the "Resources" section of the Bulletin Board or the Publications section of the MISRA web site.
Posted by and on behalf of the MISRA C Working Group

Forum Jump:

Users browsing this thread: 1 Guest(s)