fw: clang-tidy and splint: New make target: check

Add clang-tidy and splint static analytics check. For now, we use only
the cert-* warnings on clang-tidy and run splint with a lot of flags
to allow more things.

Changes to silence these analytics:

- Stop returning stuff from our debug print functions. We don't check
  them anyway and we don't have any way of detecting transmission
  failure.

- Declare more things static that isn't used outside of a file.

- Change types to be more consistent, typically to size_t or
  something or to uint32_t.
This commit is contained in:
Michael Cardell Widerkrantz 2023-03-21 14:11:08 +01:00
parent f622937918
commit c443ef8a3e
No known key found for this signature in database
GPG key ID: D3DB3DDF57E704E5
8 changed files with 70 additions and 51 deletions

View file

@ -13,20 +13,20 @@
#define htif_lf()
#define htif_puthex(c)
#define htif_putinthex(n)
#define htif_puts(s) ((int)0)
#define htif_puts(s)
#define htif_hexdump(buf, len)
#else
void htif_putc(int ch);
void htif_putc(char ch);
void htif_lf();
void htif_puthex(uint8_t c);
void htif_putinthex(const uint32_t n);
int htif_puts(const char *s);
void htif_puts(const char *s);
void htif_hexdump(void *buf, int len);
#endif
void *memset(void *dest, int c, unsigned n);
void memcpy_s(void *dest, size_t destsize, const void *src, size_t n);
void wordcpy_s(void *dest, size_t destsize, const void *src, size_t n);
int memeq(void *dest, const void *src, unsigned n);
int memeq(void *dest, const void *src, size_t n);
#endif