Coverity analysis defect 103536: Uninitialized scalar variable

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use of an uninitialized variable

      Defect 103536 (STATIC_C)
      Checker UNINIT (subcategory none)
      File: /src/mongo/s/catalog_cache.cpp
      Function mongo::CatalogCache::_getDatabase(mongo::OperationContext *, mongo::StringData)
      /src/mongo/s/catalog_cache.cpp, line: 131
      Declaring variable "refreshActionTaken" without initializer.

              DatabaseInfoRefreshAction refreshActionTaken;
      

      /src/mongo/s/catalog_cache.cpp, line: 186
      Using uninitialized value "refreshActionTaken".

                      return {CachedDatabaseInfo(*dbEntry->dbt, std::move(primaryShard)), refreshActionTaken};
      

            Assignee:
            Matthew Saltz (Inactive)
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: