diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-05-26 03:36:39 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-05-26 03:43:31 +0100 |
commit | 43b41f2383d76a6e5eaeb7b44c531e44a8fcb92a (patch) | |
tree | b41a3ce0e606fa7fe7e3003ae9bb2a157adf3471 /src | |
parent | d6005e9df8cb550a2014943729b391281e14496e (diff) | |
download | efl-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.c | 5 | ||||
-rw-r--r-- | src/lib/emile/emile_main.c | 6 |
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); |