forked from enlightenment/efl
eina - value - disable warnings for ptr math
we over-alloc thus this warning is not right. silence the warning
This commit is contained in:
parent
7e346e7bc2
commit
305750875e
|
@ -486,14 +486,20 @@ eina_value_pset(Eina_Value *value, const void *ptr)
|
|||
{
|
||||
if (type == EINA_VALUE_TYPE_STRINGSHARE)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
const char *str = *((const char * const *) ptr);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
return eina_stringshare_replace((const char **)&value->value.ptr,
|
||||
str);
|
||||
}
|
||||
else if (type == EINA_VALUE_TYPE_STRING)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
const char *str = *((const char * const *) ptr);
|
||||
#pragma GCC diagnostic pop
|
||||
if (value->value.ptr == str) return EINA_TRUE;
|
||||
if (!str)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue