kopia lustrzana https://github.com/espressif/esp-idf
c47cc63489
One common pattern of using assert function looks as follows: int ret = do_foo(); assert(ret == 0); // which reads as: “do_foo should never fail here, by design” The problem with such code is that if ‘assert’ is removed by the preprocessor in release build, variable ret is no longer used, and the compiler issues a warning about this. Changing assert definition in the way done here make the variable used, from language syntax perspective. Semantically, the variable is still unused at run time (as sizeof can be evaluated at compile time), so the compiler can optimize things away if possible. |
||
---|---|---|
.. | ||
compressed_enum_table.hpp | ||
intrusive_list.h | ||
nvs.hpp | ||
nvs_api.cpp | ||
nvs_item_hash_list.cpp | ||
nvs_item_hash_list.hpp | ||
nvs_page.cpp | ||
nvs_page.hpp | ||
nvs_pagemanager.cpp | ||
nvs_pagemanager.hpp | ||
nvs_platform.hpp | ||
nvs_storage.cpp | ||
nvs_storage.hpp | ||
nvs_test_api.h | ||
nvs_types.cpp | ||
nvs_types.hpp |