forked from enlightenment/efl
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.
This commit is contained in:
parent
d6005e9df8
commit
43b41f2383
|
@ -139,11 +139,14 @@ emile_decompress(const Eina_Binbuf *data,
|
||||||
Eina_Binbuf *out;
|
Eina_Binbuf *out;
|
||||||
void *expanded;
|
void *expanded;
|
||||||
|
|
||||||
|
// this warning is wrong here so disable it
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
expanded = malloc(dest_length);
|
expanded = malloc(dest_length);
|
||||||
if (!expanded)
|
if (!expanded)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
out = eina_binbuf_manage_new(expanded, dest_length, EINA_FALSE);
|
out = eina_binbuf_manage_new(expanded, dest_length, EINA_FALSE);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
if (!out)
|
if (!out)
|
||||||
goto on_error;
|
goto on_error;
|
||||||
|
|
||||||
|
|
|
@ -131,9 +131,13 @@ emile_pbkdf2_sha1(const char *key, unsigned int key_len, const unsigned char *sa
|
||||||
unsigned int tmp_len;
|
unsigned int tmp_len;
|
||||||
unsigned int i, j, k;
|
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);
|
buf = alloca(salt_len + 4);
|
||||||
|
|
||||||
step1 = eina_binbuf_manage_new(buf, salt_len + 4, EINA_TRUE);
|
step1 = eina_binbuf_manage_new(buf, salt_len + 4, EINA_TRUE);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
if (!step1)
|
if (!step1)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
step2 = eina_binbuf_manage_new(digest, 20, EINA_TRUE);
|
step2 = eina_binbuf_manage_new(digest, 20, EINA_TRUE);
|
||||||
|
|
Loading…
Reference in New Issue