Coverity analysis defect 105006: Uninitialized scalar field

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      A scalar field is not initialized by the constructor

      Defect 105006 (STATIC_C)
      Checker UNINIT_CTOR (subcategory none)
      File: /src/bsoncxx/private/stack.hh
      Function bsoncxx::v_noabi::stack<bsoncxx::v_noabi::builder::core::impl::frame, (unsigned long)4>::stack()
      /usr/include/c++/7/type_traits, line: 2046
      Class member declaration for "__align".

          	struct __attribute__((__aligned__((_Align)))) { } __align;
      

      /src/bsoncxx/private/stack.hh, line: 31
      Non-static class member field "object_memory._align" is not initialized in this constructor nor in any functions that it calls.

              stack() : _bucket_index(0), _bucket_size(size), _is_empty(true) {}
      

            Assignee:
            Unassigned
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: