OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (ARROW-2668) [C++] -Wnull-pointer-arithmetic warning with dlmalloc.c on clang 6.0, Ubuntu 14.04


Wes McKinney created ARROW-2668:
-----------------------------------

             Summary: [C++] -Wnull-pointer-arithmetic warning with dlmalloc.c on clang 6.0, Ubuntu 14.04 
                 Key: ARROW-2668
                 URL: https://issues.apache.org/jira/browse/ARROW-2668
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.9.0
            Reporter: Wes McKinney
             Fix For: 0.10.0


I encountered this failure with {{-Werror}} on a nearly fresh Ubuntu 14.04 install using clang-6 from LLVM apt

{code}
../src/plasma/thirdparty/dlmalloc.c:3504:68: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
      size_t mfree = m->topsize + (((((size_t)(((void*)((char*)(0) + ((sizeof(size_t))<<1)))) & (((size_t)(2 * sizeof(void *))) - ((size_t)1))) == 0)? 0 : ((((size_t)(2 * sizeof(void *))) - ((size_t)(((void*)((char*)(0) + ((sizeof(size_t))<<1)))) & (((size_t)(2 * sizeof(void *))) - ((size_t)1)))) & (((size_t)(2 * sizeof(void *))) - ((size_t)1))))+(((sizeof(struct malloc_segment)) + ((sizeof(size_t))) + (((size_t)(2 * sizeof(void *))) - ((size_t)1))) & ~(((size_t)(2 * sizeof(void *))) - ((size_t)1)))+(((sizeof(mchunk)) + (((size_t)(2 * sizeof(void *))) - ((size_t)1))) & ~(((size_t)(2 * sizeof(void *))) - ((size_t)1))));
{code}

See gist for complete log https://gist.github.com/wesm/61ee3592045bfaf390d5d4557f3c5a22



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)