Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 635176cb4 -> e92318291
Fix compilation with llvm by removing enum cast warning. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/e9231829 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e9231829 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e9231829 Branch: refs/heads/develop Commit: e9231829155da15c5fc511290bef7f80d025cc24 Parents: 635176c Author: Sterling Hughes <[email protected]> Authored: Mon Jan 9 14:54:01 2017 -0800 Committer: Sterling Hughes <[email protected]> Committed: Mon Jan 9 14:54:20 2017 -0800 ---------------------------------------------------------------------- boot/split/src/split.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e9231829/boot/split/src/split.c ---------------------------------------------------------------------- diff --git a/boot/split/src/split.c b/boot/split/src/split.c index b29a627..5e07818 100644 --- a/boot/split/src/split.c +++ b/boot/split/src/split.c @@ -89,7 +89,12 @@ split_app_active_set(int active) int split_mode_set(split_mode_t split_mode) { - if (split_mode < 0 || split_mode >= SPLIT_MODE_CNT) { + /* XXX: For now, cast this as an integer. This value should either be + * treated as an enumeration generally (i.e. not read directly and assigned + * from values in flash), or switched to a native type of integer. However, + * this is not a high priority change, so just cast it for now. + */ + if ((int) split_mode < 0 || (int) split_mode >= SPLIT_MODE_CNT) { return SYS_EINVAL; }
