summaryrefslogtreecommitdiff
path: root/src/lib/emile/emile_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-05-26 03:36:39 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-05-26 03:43:31 +0100
commit43b41f2383d76a6e5eaeb7b44c531e44a8fcb92a (patch)
treeb41a3ce0e606fa7fe7e3003ae9bb2a157adf3471 /src/lib/emile/emile_main.c
parentd6005e9df8cb550a2014943729b391281e14496e (diff)
emile - disable warnings when they are wrong ifor new buffers
emile in these 2 cases allocates an empty uninitilised buffer that will then be filled - gcc thinks we're passing uninit data to a func - which is right but intended as it is later filled. disable this warning for these segments of code.
Diffstat (limited to '')
-rw-r--r--src/lib/emile/emile_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/emile/emile_main.c b/src/lib/emile/emile_main.c
index 8591f0e8bc..ce20df757d 100644
--- a/src/lib/emile/emile_main.c
+++ b/src/lib/emile/emile_main.c
@@ -131,9 +131,13 @@ emile_pbkdf2_sha1(const char *key, unsigned int key_len, const unsigned char *sa
131 unsigned int tmp_len; 131 unsigned int tmp_len;
132 unsigned int i, j, k; 132 unsigned int i, j, k;
133 133
134// this warning is wrong here so disable it
135#pragma GCC diagnostic push
136#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
134 buf = alloca(salt_len + 4); 137 buf = alloca(salt_len + 4);
135
136 step1 = eina_binbuf_manage_new(buf, salt_len + 4, EINA_TRUE); 138 step1 = eina_binbuf_manage_new(buf, salt_len + 4, EINA_TRUE);
139#pragma GCC diagnostic pop
140
137 if (!step1) 141 if (!step1)
138 return EINA_FALSE; 142 return EINA_FALSE;
139 step2 = eina_binbuf_manage_new(digest, 20, EINA_TRUE); 143 step2 = eina_binbuf_manage_new(digest, 20, EINA_TRUE);