Commit graph

4 commits

Author SHA1 Message Date
Ivan Grokhotkov c47cc63489 newlib: change definition of assert for release builds
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.
2017-01-17 00:49:38 +08:00
Angus Gratton b877216fef stdatomic.h: Include stdint.h, required for some limit types 2017-01-10 11:11:27 +11:00
Ivan Grokhotkov 6fb430f45e vfs: add directory APIs 2017-01-09 04:51:24 +08:00
Ivan Grokhotkov bd6ea4393c Initial public version 2016-08-17 23:08:22 +08:00