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

New issue 693 by gahan.ro...@gmail.com: clan "scan-build" analysis of generated protobuf code produces warnings.
https://code.google.com/p/protobuf/issues/detail?id=693

What steps will reproduce the problem?
1. generate some c++ code with protobuf
2. use clang "scan-build" to analyse generated code.

What is the expected output? What do you see instead?
Expect to see no issues.
clang scan-build reports issues.

What version of the product are you using? On what operating system?
protobuf 2.4.1
RHEL6 linux.

Please provide any additional information below.

errors like the following are seen:


  AA71ParameterPayload_descriptor_ = file->message_type(0);
                                    ^~~~~~~~~~~~~~~~~~~~~
       warning: Called C++ object pointer is null


./aa71fw.pb.cc:1061:69: warning: Returning null reference
if (default_instance_ == NULL) protobuf_AddDesc_aa71fw_2eproto(); return *default_instance_; ^~~~~~~~~~~~~~~~~~~~~~~~~
./aa71fw.pb.cc:1379:69: warning: Returning null reference
if (default_instance_ == NULL) protobuf_AddDesc_aa71fw_2eproto(); return *default_instance_; ^~~~~~~~~~~~~~~~~~~~~~~~~

--
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