[llvm-bugs] [Bug 41019] New: Incorrectly warning about nullable parameter

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 9 11:07:52 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=41019

            Bug ID: 41019
           Summary: Incorrectly warning about nullable parameter
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alexbrachetmialot at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Seems to be a bug around nullability. attr argument to pthread_mutex_init is
declared _Nullable in the header on my machine but clang still complains to me
when passing NULL. Not a huge bug but it is annoying.

int pthread_mutex_init(pthread_mutex_t * __restrict,
                const pthread_mutexattr_t * _Nullable __restrict);

thpool.c:37:47: warning: null passed to a callee that requires a non-null
argument [-Wnonnull]
    (void) pthread_mutex_init(&tp->mutex, NULL);
                                          ~~~~^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190309/a0086328/attachment.html>


More information about the llvm-bugs mailing list