diff options
| author | Thomas Schmucker <ts@its1.de> | 2021-07-09 16:21:27 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2021-07-09 16:21:27 +0200 |
| commit | 4a3b2cbfbc070da4bc8b13456d6a0bfd81002dee (patch) | |
| tree | e61b337c567154ad981909b55fda6ad5ab053bdd | |
| parent | 9b49671d6f4e72d2c68127bf0106dc75e33dd994 (diff) | |
| download | data-structures-4a3b2cbfbc070da4bc8b13456d6a0bfd81002dee.tar.gz data-structures-4a3b2cbfbc070da4bc8b13456d6a0bfd81002dee.tar.bz2 data-structures-4a3b2cbfbc070da4bc8b13456d6a0bfd81002dee.zip | |
fix: warning from clang-tidy
| -rw-r--r-- | util.h | 9 |
1 files changed, 4 insertions, 5 deletions
| @@ -1,9 +1,9 @@ | |||
| 1 | #ifndef ITS1_UTIL_H_INCLUDED | 1 | #ifndef ITS1_UTIL_H_INCLUDED |
| 2 | #define ITS1_UTIL_H_INCLUDED | 2 | #define ITS1_UTIL_H_INCLUDED |
| 3 | 3 | ||
| 4 | #include <stdarg.h> | ||
| 4 | #include <stdio.h> | 5 | #include <stdio.h> |
| 5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
| 6 | #include <stdarg.h> | ||
| 7 | 7 | ||
| 8 | #ifndef NDEBUG | 8 | #ifndef NDEBUG |
| 9 | static void | 9 | static void |
| @@ -19,14 +19,13 @@ error(const char *msg, ...) | |||
| 19 | exit(EXIT_FAILURE); | 19 | exit(EXIT_FAILURE); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | #define ERROR(msg) error(msg " in \"%s()\" (%s:%d)", __func__, __FILE__, __LINE__) | 22 | # define ERROR(msg) error(msg " in \"%s()\" (%s:%d)", __func__, __FILE__, __LINE__) |
| 23 | #else | 23 | #else |
| 24 | #define ERROR(msg) /**/ | 24 | # define ERROR(msg) /**/ |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| 27 | #ifndef NELEM | 27 | #ifndef NELEM |
| 28 | #define NELEM(x) (sizeof(x) / sizeof(x[0])) | 28 | # define NELEM(x) (sizeof(x) / sizeof(x[0])) /* NOLINT */ |
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | #endif | 31 | #endif |
| 32 | |||
