Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 650 by gli...@chromium.org: Clang barks at file->options() != NULL
http://code.google.com/p/protobuf/issues/detail?id=650

With the ToT Clang the following warning is reported when I'm trying to build Chromium:

../../third_party/protobuf/src/google/protobuf/descriptor.cc -o obj/third_party/protobuf/src/google/protobuf/protobuf_full_do_not_use.descriptor.o ../../third_party/protobuf/src/google/protobuf/descriptor.cc:4024:11: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare]
         &file->options() != NULL &&
          ^~~~~~~~~~~~~~~    ~~~~
../../third_party/protobuf/src/google/protobuf/descriptor.h:1410:1: note: 'options' returns a reference
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions)
^
../../third_party/protobuf/src/google/protobuf/descriptor.h:1320:29: note: expanded from macro 'PROTOBUF_DEFINE_OPTIONS_ACCESSOR'
  inline const TYPE& CLASS::options() const { return *options_; }
                            ^
1 error generated.


This line is still present in the upstream protobuf: https://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/descriptor.cc#4025

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to