Skip to content

Tons of warnings related to GUARDED_BY on Mac #955

@girving

Description

@girving

I get a bunch of these:

In file included from tensorflow/core/framework/load_library.cc:20:
./tensorflow/core/framework/op_kernel.h:945:63: warning: 'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'tensorflow::mutex' [-Wthread-safety-attributes]
  gtl::InlinedVector<WrappedAllocator, 4> wrapped_allocators_ GUARDED_BY(mu_);
                                                              ^
./tensorflow/core/platform/default/thread_annotations.h:52:53: note: expanded from macro 'GUARDED_BY'
#define GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
                                                    ^
./tensorflow/core/platform/default/thread_annotations.h:42:57: note: expanded from macro 'THREAD_ANNOTATION_ATTRIBUTE__'
#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions