[riot-notifications] [RIOT-OS/RIOT] sys/riotboot: add missing assert.h (#11886)

Bas Stottelaar notifications at github.com
Tue Jul 23 00:35:07 CEST 2019


### Contribution description

It seems that `assert()` is provided via some include, but this is not the case for all boards. This PR adds it.

Here is a part of the log, for my (custom) board:

```
/RIOT/sys/riotboot/flashwrite.c: In function 'riotboot_flashwrite_init_raw':
/RIOT/sys/riotboot/flashwrite.c:51:5: error: implicit declaration of function 'assert' [-Werror=implicit-function-declaration]
     assert(offset <= FLASHPAGE_SIZE);
     ^~~~~~
/RIOT/sys/riotboot/flashwrite.c:51:5: note: 'assert' is defined in header '<assert.h>'; did you forget to '#include <assert.h>'?
/RIOT/sys/riotboot/flashwrite.c:31:1:
+#include <assert.h>

/RIOT/sys/riotboot/flashwrite.c:51:5:
     assert(offset <= FLASHPAGE_SIZE);
     ^~~~~~
cc1: all warnings being treated as errors
```

### Testing procedure

Run `cd tests/riotboot_flashwrite && make`. Compilation should still be fine.

### Issues/PRs references

None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11886

-- Commit Summary --

  * sys/riotboot: add missing assert.h

-- File Changes --

    M sys/riotboot/flashwrite.c (1)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11886.patch
https://github.com/RIOT-OS/RIOT/pull/11886.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11886
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190722/51375b1f/attachment-0001.htm>


More information about the notifications mailing list