]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
xh_cidx: include khashl.h to placate cppcheck(1)
authorEric Wong <e@80x24.org>
Sun, 26 Oct 2025 00:16:43 +0000 (00:16 +0000)
committerEric Wong <e@80x24.org>
Mon, 27 Oct 2025 17:40:53 +0000 (17:40 +0000)
cppcheck(1) will complain about things normal compilers don't.
While this #include is unnecessary to us since we only have a
single compilation unit and don't intend to reuse this header
elsewhere, it seems mostly harmless since GNU and clang
preprocessors should be able to optimize out redundant headers,
anyways, even w/o `#pragma once'.

lib/PublicInbox/xh_cidx.h

index fa9d1ee4273d1322bee578f81d0dda66336e3e60..c725e07addda1ce1a51d75a49fe512d97f79484b 100644 (file)
@@ -6,6 +6,7 @@
 // TODO: consider making PublicInbox::CodeSearchIdx emit binary
 // (20 or 32-bit) OIDs instead of ASCII hex.  It would require
 // more code in both Perl and C++, though...
+#include "khashl.h"
 
 // assumes trusted data from same host
 static inline unsigned int hex2uint(char c)