提交 6a693db7 编写于 作者: armink_ztl's avatar armink_ztl 提交者: Damien George

extmod/re1.5: Fix compilecode.c compile problem on IAR tool chain.

The 2nd and 3rd args of the ternary operator are treated like they are in
the same expression and must have similar types.  void is not compatible
with int so that's why the compiler is complaining.
上级 cf31d384
......@@ -5,9 +5,9 @@
#include "re1.5.h"
#define INSERT_CODE(at, num, pc) \
((code ? memmove(code + at + num, code + at, pc - at) : (void)0), pc += num)
((code ? memmove(code + at + num, code + at, pc - at) : 0), pc += num)
#define REL(at, to) (to - at - 2)
#define EMIT(at, byte) (code ? (code[at] = byte) : (void)(at))
#define EMIT(at, byte) (code ? (code[at] = byte) : (at))
#define PC (prog->bytelen)
static const char *_compilecode(const char *re, ByteProg *prog, int sizecode)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册