]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/StoreStats.h
Fix GCC-9 build issues (#413)
[thirdparty/squid.git] / src / StoreStats.h
index 9ba56a62d69b85b6e1c7d2aa1e1812ea1000a57a..1d5ee95ac4394405c8ac130256dcc4236c75db1e 100644 (file)
@@ -17,9 +17,9 @@ public:
     class Part
     {
     public:
-        double size; ///< bytes currently in use
-        double count; ///< number of cached objects
-        double capacity; ///< the size limit
+        double size = 0.0; ///< bytes currently in use
+        double count = 0.0; ///< number of cached objects
+        double capacity = 0.0; ///< the size limit
 
         /// mean size of a cached object
         double meanObjectSize() const { return count > 0 ? size/count : 0.0; }
@@ -32,25 +32,24 @@ public:
     class Swap: public Part
     {
     public:
-        double open_disk_fd; ///< number of opened disk files
+        double open_disk_fd = 0.0; ///< number of opened disk files
     };
 
     /// memory cache (cache_mem) storage stats
     class Mem: public Part
     {
     public:
-        bool shared; ///< whether memory cache is shared among workers
+        bool shared = false; ///< whether memory cache is shared among workers
     };
 
-    StoreInfoStats();
     StoreInfoStats &operator +=(const StoreInfoStats &stats);
 
     Swap swap; ///< cache_mem stats
     Mem mem; ///< all cache_dirs stats
 
     /* stats that could be shared by memory and disk storage */
-    double store_entry_count; ///< number of StoreEntry objects in existence
-    double mem_object_count; ///< number of MemObject objects in existence
+    double store_entry_count = 0.0; ///< number of StoreEntry objects in existence
+    double mem_object_count = 0.0; ///< number of MemObject objects in existence
 };
 
 // TODO: this should be adjusted for use in StoreIoActionData, DiskdActionData