summaryrefslogtreecommitdiff
path: root/src
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
parentd6005e9df8cb550a2014943729b391281e14496e (diff)
downloadefl-43b41f2383d76a6e5eaeb7b44c531e44a8fcb92a.tar.gz
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 'src')
-rw-r--r--src/lib/emile/emile_compress.c5
-rw-r--r--src/lib/emile/emile_main.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/emile/emile_compress.c b/src/lib/emile/emile_compress.c
index 783e00b1ab..b755717454 100644
--- a/src/lib/emile/emile_compress.c
+++ b/src/lib/emile/emile_compress.c
@@ -139,11 +139,14 @@ emile_decompress(const Eina_Binbuf *data,
Eina_Binbuf *out;
void *expanded;
+// this warning is wrong here so disable it
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
expanded = malloc(dest_length);
if (!expanded)
return NULL;
-
out = eina_binbuf_manage_new(expanded, dest_length, EINA_FALSE);
+#pragma GCC diagnostic pop
if (!out)
goto on_error;
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
unsigned int tmp_len;
unsigned int i, j, k;
+// this warning is wrong here so disable it
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
buf = alloca(salt_len + 4);
-
step1 = eina_binbuf_manage_new(buf, salt_len + 4, EINA_TRUE);
+#pragma GCC diagnostic pop
+
if (!step1)
return EINA_FALSE;
step2 = eina_binbuf_manage_new(digest, 20, EINA_TRUE);