kopia lustrzana https://github.com/espressif/esp-idf
Add test for compiling in release mode, fix warnings and errors which appeared
rodzic
182184567e
commit
1cd572c7b9
|
@ -37,6 +37,12 @@ build_template_app:
|
|||
# branch
|
||||
- git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..."
|
||||
- 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
|
||||
|
||||
|
||||
|
|
|
@ -7177,7 +7177,7 @@ uint32_t nghttp2_session_get_remote_settings(nghttp2_session *session,
|
|||
return session->remote_settings.max_header_list_size;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
abort();
|
||||
}
|
||||
|
||||
static int nghttp2_session_upgrade_internal(nghttp2_session *session,
|
||||
|
|
|
@ -769,7 +769,7 @@ void Page::invalidateCache()
|
|||
|
||||
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;
|
||||
for (size_t i = 0; i < ENTRY_COUNT; ++i) {
|
||||
printf("%3d: ", static_cast<int>(i));
|
||||
|
|
|
@ -49,7 +49,7 @@ esp_err_t PageManager::load(uint32_t baseSector, uint32_t sectorCount)
|
|||
return activatePage();
|
||||
} else {
|
||||
uint32_t lastSeqNo;
|
||||
assert(mPageList.back().getSeqNumber(lastSeqNo) == ESP_OK);
|
||||
ESP_ERROR_CHECK( mPageList.back().getSeqNumber(lastSeqNo) );
|
||||
mSeqNumber = lastSeqNo + 1;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,9 @@ esp_err_t PageManager::requestNewPage()
|
|||
Page* newPage = &mPageList.back();
|
||||
|
||||
Page* erasedPage = maxErasedItemsPageIt;
|
||||
#ifndef NDEBUG
|
||||
size_t usedEntries = erasedPage->getUsedEntryCount();
|
||||
#endif
|
||||
err = erasedPage->markFreeing();
|
||||
if (err != ESP_OK) {
|
||||
return err;
|
||||
|
|
|
@ -123,8 +123,7 @@ esp_err_t Storage::writeItem(uint8_t nsIndex, ItemType datatype, const char* key
|
|||
if (findPage) {
|
||||
if (findPage->state() == Page::PageState::UNINITIALIZED ||
|
||||
findPage->state() == Page::PageState::INVALID) {
|
||||
auto err = findItem(nsIndex, datatype, key, findPage, item);
|
||||
assert(err == ESP_OK);
|
||||
ESP_ERROR_CHECK( findItem(nsIndex, datatype, key, findPage, item) );
|
||||
}
|
||||
err = findPage->eraseItem(nsIndex, datatype, key);
|
||||
if (err == ESP_ERR_FLASH_OP_FAIL) {
|
||||
|
|
Ładowanie…
Reference in New Issue