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: unassignedclangb...@nondot.org
          Reporter: alexbrachetmia...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to