Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-20388

Resolve remaining phosphor build warnings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • .master
    • .master
    • phosphor
    • Untriaged
    • 2
    • Unknown

    Description

      category_registry.h:37, GNU Make + GNU C Compiler (gcc), Priority: Normal
      type attributes ignored after type is already defined [-Wattributes]
       
      string_utils.cc:43, GNU Make + GNU C Compiler (gcc), Priority: Normal
      comparison between signed and unsigned integer expressions [-Wsign-compare]
       
      trace_buffer_test.cc:74, GNU Make + GNU C Compiler (gcc), Priority: Normal
      comparison between signed and unsigned integer expressions [-Wsign-compare]
       
      trace_buffer_test.cc:109, GNU Make + GNU C Compiler (gcc), Priority: Normal
      comparison between signed and unsigned integer expressions [-Wsign-compare]
      

      ** CID 139171: Uninitialized members (UNINIT_CTOR) /phosphor/include/phosphor/trace_log.h: 177 in phosphor::TraceConfig::TraceConfig()()
       
      ______________________________________________________________________________________________________ 
      * CID 139171: Uninitialized members (UNINIT_CTOR) /phosphor/include/phosphor/trace_log.h: 177 in phosphor::TraceConfig::TraceConfig()() 171 * 172 * All other arguments are optional and may be specified using chainable 173 * methods. 174 */ 175 class TraceConfig { 176 public:
       
      CID 139171: Uninitialized members (UNINIT_CTOR) Non-static class member “buffer_size” is not initialized in this constructor nor in any functions that it calls.
       
      177 TraceConfig() = default; 178 179 /** 180 * Constructor used when using a builtin TraceBuffer type 181 * 182 * @param _buffer_mode Which buffer mode to use. Cannot be
       
      ** CID 139170: Insecure data handling (TAINTED_SCALAR) /phosphor/src/trace_log.cc: 89 in phosphor::TraceLogConfig::fromEnvironment()()
       
      ______________________________________________________________________________________________________ 
      * CID 139170: Insecure data handling (TAINTED_SCALAR) /phosphor/src/trace_log.cc: 89 in phosphor::TraceLogConfig::fromEnvironment()() 83 84 this->setSentinelCount(static_cast<unsigned>(sentinel_count)); 85 } 86 87 const char* startup_config = std::getenv("PHOSPHOR_TRACING_START"); 88 if (startup_config && strlen(startup_config)) {
       
      CID 139170: Insecure data handling (TAINTED_SCALAR) Call to function “basic_string” with tainted argument “startup_config” transitively taints “<temporary>”.
       
      89 this->setStartupTrace(TraceConfig::fromString(startup_config)); 90 } 91 92 return *this; 93 } 94
       
      ** CID 139169: Integer handling issues (NEGATIVE_RETURNS)
       
      ______________________________________________________________________________________________________ 
      * CID 139166: Error handling issues (CHECKED_RETURN) /phosphor/tests/module/export_test.cc: 100 in FileStopCallbackTest::~FileStopCallbackTest()() 94 95 class FileStopCallbackTest : public testing::Test { 96 public: 97 FileStopCallbackTest() = default; 98 ~FileStopCallbackTest() { 99 if (filename != "") {
       
      CID 139166: Error handling issues (CHECKED_RETURN) Calling “remove(this->filename.c_str())” without checking return value. This library function may fail and return an error code.
       
      100 std::remove(filename.c_str()); 101 } 102 } 103 104 protected: 105 std::string filename;
       
      ** CID 27315: Uninitialized members (UNINIT_CTOR) /usr/include/c++/4.9/functional: 2430 in std::function<std::unique_ptr<phosphor::TraceBuffer, std::default_delete<phosphor::TraceBuffer>> (unsigned long, unsigned long)>::function<std::unique_ptr<phosphor::TraceBuffer, std::default_delete<phosphor::TraceBuffer>> (*)(unsigned long, unsigned long), void>(T1)()
       
      ______________________________________________________________________________________________________ 
      * CID 27315: Uninitialized members (UNINIT_CTOR) /usr/include/c++/4.9/functional: 2430 in std::function<std::unique_ptr<phosphor::TraceBuffer, std::default_delete<phosphor::TraceBuffer>> (unsigned long, unsigned long)>::function<std::unique_ptr<phosphor::TraceBuffer, std::default_delete<phosphor::TraceBuffer>> (*)(unsigned long, unsigned long), void>(T1)() 2424 if (_My_handler::_M_not_empty_function(__f)) 2425 { 2426 _My_handler::_M_init_functor(_M_functor, std::move(__f)); 2427 _M_invoker = &_My_handler::_M_invoke; 2428 _M_manager = &_My_handler::_M_manager; 2429 }
       
      CID 27315: Uninitialized members (UNINIT_CTOR) Non-static class member “_M_invoker” is not initialized in this constructor nor in any functions that it calls.
       
      2430 } 2431 2432 template<typename _Res, typename… _ArgTypes> 2433 _Res 2434 function<_Res(_ArgTypes…)>:: 2435 operator()(_ArgTypes… __args) const
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            will.gardner Will Gardner (Inactive)
            will.gardner Will Gardner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty