Skip to content

Commit

Permalink
Fixed warning that progBuffer was uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
amiller27 committed May 13, 2016
1 parent b676228 commit 66d88b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Arduino/MPU9150/MPU9150.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,7 @@ bool MPU9150::writeMemoryBlock(const uint8_t *data, uint16_t dataSize, uint8_t b
uint8_t j;
if (verify) verifyBuffer = (uint8_t *)malloc(MPU9150_DMP_MEMORY_CHUNK_SIZE);
if (useProgMem) progBuffer = (uint8_t *)malloc(MPU9150_DMP_MEMORY_CHUNK_SIZE);
else progBuffer = NULL;
for (i = 0; i < dataSize;) {
// determine correct chunk size according to bank position and data size
chunkSize = MPU9150_DMP_MEMORY_CHUNK_SIZE;
Expand Down Expand Up @@ -3150,4 +3151,4 @@ uint8_t MPU9150::getDMPConfig2() {
}
void MPU9150::setDMPConfig2(uint8_t config) {
I2Cdev::writeByte(devAddr, MPU9150_RA_DMP_CFG_2, config);
}
}

0 comments on commit 66d88b4

Please sign in to comment.