Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix cppcheck warnings about uninitialized member variables
  • Loading branch information
rouault authored and nyalldawson committed Apr 10, 2023
1 parent f0c4632 commit ed22eab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/plugins/grass/qtermwidget/BlockArray.h
Expand Up @@ -33,11 +33,8 @@
namespace Konsole {

struct Block {
Block() {
size = 0;
}
unsigned char data[ENTRIES];
size_t size;
unsigned char data[ENTRIES] = {};
size_t size = 0;
};

// ///////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qtermwidget/History.h
Expand Up @@ -75,7 +75,7 @@ class HistoryFile
//'get' is called.
//this is used to detect when a large number of lines are being read and processed from the history
//and automatically mmap the file for better performance (saves the overhead of many lseek-read calls).
int readWriteBalance;
int readWriteBalance = 0;

//when readWriteBalance goes below this threshold, the file will be mmap'ed automatically
static const int MAP_THRESHOLD = -1000;
Expand Down

0 comments on commit ed22eab

Please sign in to comment.