From 0de992c5f9f7f74de4e11d907afebe052b5fa434 Mon Sep 17 00:00:00 2001 From: Grant Morphett Date: Wed, 29 Jul 2015 17:24:27 +1000 Subject: [PATCH] DataFlash: fix coverity warnings - add param init in constructor --- libraries/DataFlash/DataFlash_Backend.h | 3 ++- libraries/DataFlash/DataFlash_File.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/DataFlash/DataFlash_Backend.h b/libraries/DataFlash/DataFlash_Backend.h index 5f384e9317..ab1681df31 100644 --- a/libraries/DataFlash/DataFlash_Backend.h +++ b/libraries/DataFlash/DataFlash_Backend.h @@ -23,7 +23,8 @@ public: FUNCTOR_TYPEDEF(print_mode_fn, void, AP_HAL::BetterStream*, uint8_t); DataFlash_Backend(DataFlash_Class &front) : - _front(front) + _front(front), + _structures(NULL) { } virtual bool CardInserted(void) = 0; diff --git a/libraries/DataFlash/DataFlash_File.cpp b/libraries/DataFlash/DataFlash_File.cpp index b0d19b6528..0e7b9633e7 100644 --- a/libraries/DataFlash/DataFlash_File.cpp +++ b/libraries/DataFlash/DataFlash_File.cpp @@ -38,6 +38,7 @@ DataFlash_File::DataFlash_File(DataFlash_Class &front, const char *log_directory DataFlash_Backend(front), _write_fd(-1), _read_fd(-1), + _read_fd_log_num(0), _read_offset(0), _write_offset(0), _initialised(false),