Skip to content

Commit 4bd32df

Browse files
committed
llama-gguf-hash: ignore maybe-uninitialized gcc-8 error
1 parent 5360799 commit 4bd32df

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

examples/gguf-hash/deps/sha256/sha256.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,21 @@ static const uint32_t K[64] = {
9494
static void
9595
sha256_transform(uint32_t *state, const uint32_t *data)
9696
{
97+
#if defined(__GNUC__)
98+
# pragma GCC diagnostic push
99+
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
100+
#elif (defined(__llvm__) || defined(__clang__)) && defined( __has_warning )
101+
# pragma clang diagnostic push
102+
# if __has_warning("-Wmaybe-uninitialized")
103+
# pragma clang diagnostic ignored "-Wmaybe-uninitialized"
104+
# endif
105+
#endif
97106
uint32_t W[16];
107+
#if defined(__GNUC__)
108+
# pragma GCC diagnostic pop
109+
#elif defined(__llvm__) || defined(__clang__)
110+
# pragma clang diagnostic pop
111+
#endif
98112
unsigned j;
99113
#ifdef _SHA256_UNROLL2
100114
uint32_t a,b,c,d,e,f,g,h;

0 commit comments

Comments
 (0)