# Copyright 2023 MicroEJ Corp. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found with this software.

############################
# MicroEJ suppressions
############################

### MicroEJ not applicable, based on the file TLT-MicroEJ_MISRA_rules version 1.5A

# Please uncomment the required misra rules to ignore if your project has only detections that match the generic justification.

# A project should not contain unused type declarations
# Generic justification: A type can be defined at API level and not used by the application
#misra-c2012-2.3

# A project should not contain unused tag declarations
# Generic justification: A tag can be defined at API level and not used by the application
#misra-c2012-2.4

# A project should not contain unused macro declarations
# Generic justification: A macro can be defined at API level and not used by the application
#misra-c2012-2.5

# Trigraphs should not be used
# Generic justification: Can be used in simple cases
#misra-c2012-4.2

# An external object or function shall be declared once in one and only one file
# Generic justification: Needed when has to be used in API implementation and not visible in C header file
#misra-c2012-8.5

# Conversions shall not be performed between a pointer to an incomplete type and any other type
# Generic justification: Used for code genericity/abstraction 
#misra-c2012-11.2

# A cast shall not be performed between a pointer to object type and a pointer to a different object type
# Generic justification: Used by many C framework to factorize code
#misra-c2012-11.3

# A conversion should not be performed between a pointer to object and an integer type
# Generic justification: Used when coding BSP C source code (drivers, etc.) 
#misra-c2012-11.4

# A conversion should not be performed from pointer to void into pointer to object
# Generic justification: Used for code genericity/abstraction
#misra-c2012-11.5

# A function parameter should not be modified
# Generic justification: Can be usefull when designing C library
#misra-c2012-17.8

# The +, -, += and -= operators should not be applied to an expression of pointer type
# Generic justification: Can be used in configurable C library
#misra-c2012-18.4

# The union keyword should not be used
# Generic justification: Can be usefull when designing C library
#misra-c2012-19.2

# The #include directive shall be followed by either a or "filename" sequence
# Generic justification: Can be used in configurable C library
#misra-c2012-20.3

# The # and ## preprocessor operators should not be used
# Generic justification: Used by MicroEJ architectures
#misra-c2012-20.10

# A macro parameter used as an operand to the # or ## operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators
# Generic justification: Used by legacy LL APIs C header files automatically generated
#misra-c2012-20.12

# The memory allocation and deallocation functions of <stdlib.h> shall not be used
# Generic justification: Usage sometime forced by BSP
#misra-c2012-21.3

# The standard header file <signal.h> shall not beused
# Generic justification: Used by POSIX platforms
#misra-c2012-21.5

# The Standard Library input/output functions shall not be used
# Generic justification: Used for printf usage
#misra-c2012-21.6

# The atof, atoi, atol and atoll functions of <stdlib.h> shall not be used
# Generic justification: Usefull for NET Low Level part
#misra-c2012-21.7

# The library functions abort, exit, getenv and system of <stdlib.h> shall not be used
# Generic justification: Used by POSIX platforms 
#misra-c2012-21.8

# The Standard Library time and date functions shall not be used
# Generic justification: Used by POSIX platforms
#misra-c2012-21.10

############################
# Not MISRA rules
############################

# You can uncomment the following cppcheck rules below if needed since these warnings are checked by the C compiler.

# Unused functions
#unusedFunction

# Missing include files
#missingInclude

# Const parameters
#constParameter

# Unread Variable
#unreadVariable

# Variable Scope
#variableScope

# Unused Variable
#unusedVariable

# Null Pointer Arithmetic Redundant Check
#nullPointerArithmeticRedundantCheck

# Null Pointer Redundant Check
#nullPointerRedundantCheck

# Redundant Assignment
#redundantAssignment

# Known Condition True False
#knownConditionTrueFalse

# Uninit var
#uninitvar

# Legacy Uninit var
#legacyUninitvar

# Shadow Variable
#shadowVariable

# Missing Return
#missingReturn

# Preprocessor Error Directive
#preprocessorErrorDirective

# Redundant Initialization
#redundantInitialization

# Uninit Struct Member
#uninitStructMember

# Unmatched Suppression
#unmatchedSuppression

# KnownArgument
#knownArgument

# ShadowFunction
#shadowFunction

## --------------------- ##
## Specific suppressions ##
## --------------------- ##

# Please add here misra rule exclusions in specific files. These exclusions must be compliant with the file TLT-MicroEJ_MISRA_rules
# and must be preceded by a justification that matches all cases.

# Here is a justification example comment for the rule x.x in the file file_example.c
#misra-c2012-x.x:../../core/src/file_example.c
