Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jul 05, 2022
  2. Apr 22, 2022
  3. Apr 21, 2022
  4. Apr 07, 2022
  5. Apr 06, 2022
  6. Mar 29, 2022
  7. Mar 23, 2022
  8. Mar 14, 2022
  9. Mar 01, 2022
    • Abramo Bagnara's avatar
      coding guidelines: partially comply with MISRA C:2012 essential types rules. · d03fa8d8
      Abramo Bagnara authored
      
      In particular:
      
      - use bool when the data nature is Boolean;
      
      - use explicit comparison with 0 or NULL;
      
      - avoid mixing signed and unsigned integers in computations and
        comparisons;
      
      - avoid mixing enumerations with integers: when this is unavoidable,
        always convert enums to integers and not the other way around;
      
      - avoid mixing characters with integers;
      
      - ensure computations are done in the destination precision;
      
      - added /*? comments when the developer intentions are not clear;
      
      - added U suffix to unsigned constants (except for the CONFIG_* macro
        constants, as they cannot be changed and then their use as unsigned
        constants should be prefixed with a cast).
      
      Violations for rules 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8,
      11.7, 12.2, 14.4 and 16.7 in the reference builds have been reduced
      from 67818 to 60.  The commit cannot be divided on a per-rule basis
      due to numerous cross-dependencies between changes.
      
      Signed-off-by: default avatarAbramo Bagnara <abramo.bagnara@bugseng.com>
      d03fa8d8
  10. Feb 22, 2022
  11. Feb 08, 2022
Loading