You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Sets the write partition if set by virtual keypad key '/'
if (setPartition) {....
Basis:
In C++, a bool variable that is not explicitly initialized will have an indeterminate value. This means it could be either true or false, depending on whatever value happens to be in the memory location assigned to the variable.
To ensure predictable behavior, you should always initialize your bool variables
Pretty sure this holds true for all objects.
The text was updated successfully, but these errors were encountered:
I haven't programmed in awhile but I don't think much has changed.
Need to add initializers to new objects:
dscKeybusInterface.cpp line 317,318
previousTime and setPartition are used without being initialized.
Example:
void dscKeybusInterface::setWriteKey(const char receivedKey) {
static unsigned long previousTime;
static bool setPartition;
// Sets the write partition if set by virtual keypad key '/'
if (setPartition) {....
Basis:
In C++, a bool variable that is not explicitly initialized will have an indeterminate value. This means it could be either true or false, depending on whatever value happens to be in the memory location assigned to the variable.
To ensure predictable behavior, you should always initialize your bool variables
Pretty sure this holds true for all objects.
The text was updated successfully, but these errors were encountered: