aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-03-05 17:15:08 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-03-07 02:21:24 +0100
commit2b58b22845a76baf24141155eb4d4a882f509e97 (patch)
tree748da30c4176ea60e2132654267dbfbbb687ae28
parenta83c806d1786fbe19bc6a3014f248e928e00651b (diff)
downloadpasst-2b58b22845a76baf24141155eb4d4a882f509e97.tar
passt-2b58b22845a76baf24141155eb4d4a882f509e97.tar.gz
passt-2b58b22845a76baf24141155eb4d4a882f509e97.tar.bz2
passt-2b58b22845a76baf24141155eb4d4a882f509e97.tar.lz
passt-2b58b22845a76baf24141155eb4d4a882f509e97.tar.xz
passt-2b58b22845a76baf24141155eb4d4a882f509e97.tar.zst
passt-2b58b22845a76baf24141155eb4d4a882f509e97.zip
cppcheck: Add suppressions for "logically" exported functionsHEADmaster
We have some functions in our headers which are definitely there on purpose. However, they're not yet used outside the files in which they're defined. That causes sufficiently recent cppcheck versions (2.17) to complain they should be static. Suppress the errors for these "logically" exported functions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--iov.c1
-rw-r--r--log.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/iov.c b/iov.c
index 3b12272..8c63b7e 100644
--- a/iov.c
+++ b/iov.c
@@ -203,6 +203,7 @@ size_t iov_tail_size(struct iov_tail *tail)
* overruns the IO vector, is not contiguous or doesn't have the
* requested alignment.
*/
+/* cppcheck-suppress [staticFunction,unmatchedSuppression] */
void *iov_peek_header_(struct iov_tail *tail, size_t len, size_t align)
{
char *p;
diff --git a/log.c b/log.c
index 6eda4c4..d40d7ae 100644
--- a/log.c
+++ b/log.c
@@ -281,6 +281,7 @@ static void passt_vsyslog(bool newline, int pri, const char *format, va_list ap)
* @format: Message
* @ap: Variable argument list
*/
+/* cppcheck-suppress [staticFunction,unmatchedSuppression] */
void vlogmsg(bool newline, bool cont, int pri, const char *format, va_list ap)
{
bool debug_print = (log_mask & LOG_MASK(LOG_DEBUG)) && log_file == -1;