mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Add test for compiling in release mode, fix warnings and errors which appeared
This commit is contained in:
parent
182184567e
commit
1cd572c7b9
@ -37,6 +37,12 @@ build_template_app:
|
|||||||
# branch
|
# branch
|
||||||
- git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..."
|
- git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..."
|
||||||
- make defconfig
|
- make defconfig
|
||||||
|
# Test debug build (default)
|
||||||
|
- make all V=1
|
||||||
|
# Now test release build
|
||||||
|
- make clean
|
||||||
|
- sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
|
||||||
|
- make defconfig
|
||||||
- make all V=1
|
- make all V=1
|
||||||
|
|
||||||
|
|
||||||
|
@ -7177,7 +7177,7 @@ uint32_t nghttp2_session_get_remote_settings(nghttp2_session *session,
|
|||||||
return session->remote_settings.max_header_list_size;
|
return session->remote_settings.max_header_list_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(0);
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nghttp2_session_upgrade_internal(nghttp2_session *session,
|
static int nghttp2_session_upgrade_internal(nghttp2_session *session,
|
||||||
|
@ -769,7 +769,7 @@ void Page::invalidateCache()
|
|||||||
|
|
||||||
void Page::debugDump() const
|
void Page::debugDump() const
|
||||||
{
|
{
|
||||||
printf("state=%x addr=%x seq=%d\nfirstUsed=%d nextFree=%d used=%d erased=%d\n", mState, mBaseAddress, mSeqNumber, static_cast<int>(mFirstUsedEntry), static_cast<int>(mNextFreeEntry), mUsedEntryCount, mErasedEntryCount);
|
printf("state=%x addr=%x seq=%d\nfirstUsed=%d nextFree=%d used=%d erased=%d\n", (int) mState, mBaseAddress, mSeqNumber, static_cast<int>(mFirstUsedEntry), static_cast<int>(mNextFreeEntry), mUsedEntryCount, mErasedEntryCount);
|
||||||
size_t skip = 0;
|
size_t skip = 0;
|
||||||
for (size_t i = 0; i < ENTRY_COUNT; ++i) {
|
for (size_t i = 0; i < ENTRY_COUNT; ++i) {
|
||||||
printf("%3d: ", static_cast<int>(i));
|
printf("%3d: ", static_cast<int>(i));
|
||||||
|
@ -49,7 +49,7 @@ esp_err_t PageManager::load(uint32_t baseSector, uint32_t sectorCount)
|
|||||||
return activatePage();
|
return activatePage();
|
||||||
} else {
|
} else {
|
||||||
uint32_t lastSeqNo;
|
uint32_t lastSeqNo;
|
||||||
assert(mPageList.back().getSeqNumber(lastSeqNo) == ESP_OK);
|
ESP_ERROR_CHECK( mPageList.back().getSeqNumber(lastSeqNo) );
|
||||||
mSeqNumber = lastSeqNo + 1;
|
mSeqNumber = lastSeqNo + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,9 @@ esp_err_t PageManager::requestNewPage()
|
|||||||
Page* newPage = &mPageList.back();
|
Page* newPage = &mPageList.back();
|
||||||
|
|
||||||
Page* erasedPage = maxErasedItemsPageIt;
|
Page* erasedPage = maxErasedItemsPageIt;
|
||||||
|
#ifndef NDEBUG
|
||||||
size_t usedEntries = erasedPage->getUsedEntryCount();
|
size_t usedEntries = erasedPage->getUsedEntryCount();
|
||||||
|
#endif
|
||||||
err = erasedPage->markFreeing();
|
err = erasedPage->markFreeing();
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
return err;
|
return err;
|
||||||
|
@ -123,8 +123,7 @@ esp_err_t Storage::writeItem(uint8_t nsIndex, ItemType datatype, const char* key
|
|||||||
if (findPage) {
|
if (findPage) {
|
||||||
if (findPage->state() == Page::PageState::UNINITIALIZED ||
|
if (findPage->state() == Page::PageState::UNINITIALIZED ||
|
||||||
findPage->state() == Page::PageState::INVALID) {
|
findPage->state() == Page::PageState::INVALID) {
|
||||||
auto err = findItem(nsIndex, datatype, key, findPage, item);
|
ESP_ERROR_CHECK( findItem(nsIndex, datatype, key, findPage, item) );
|
||||||
assert(err == ESP_OK);
|
|
||||||
}
|
}
|
||||||
err = findPage->eraseItem(nsIndex, datatype, key);
|
err = findPage->eraseItem(nsIndex, datatype, key);
|
||||||
if (err == ESP_ERR_FLASH_OP_FAIL) {
|
if (err == ESP_ERR_FLASH_OP_FAIL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user