cmistake no return value, no mistakes

This commit is contained in:
Enno Rehling 2017-06-25 08:21:14 +02:00
parent efd826c0a2
commit 2dab88b118
2 changed files with 6 additions and 7 deletions

View File

@ -258,15 +258,14 @@ message * msg_error(const unit * u, struct order *ord, int mno) {
return msg_feedback(u, ord, msgname, ""); return msg_feedback(u, ord, msgname, "");
} }
message * cmistake(const unit * u, struct order *ord, int mno, int mtype) void cmistake(const unit * u, struct order *ord, int mno, int mtype)
{ {
message * result; message * msg;
UNUSED_ARG(mtype); UNUSED_ARG(mtype);
result = msg_error(u, ord, mno); msg = msg_error(u, ord, mno);
if (result) { if (msg) {
ADDMSG(&u->faction->msgs, result); ADDMSG(&u->faction->msgs, msg);
} }
return result;
} }
void syntax_error(const struct unit *u, struct order *ord) void syntax_error(const struct unit *u, struct order *ord)

View File

@ -60,7 +60,7 @@ extern "C" {
#define ADDMSG(msgs, mcreate) { message * mx = mcreate; if (mx) { assert(mx->refcount>=1); add_message(msgs, mx); msg_release(mx); } } #define ADDMSG(msgs, mcreate) { message * mx = mcreate; if (mx) { assert(mx->refcount>=1); add_message(msgs, mx); msg_release(mx); } }
void syntax_error(const struct unit *u, struct order *ord); void syntax_error(const struct unit *u, struct order *ord);
struct message * cmistake(const struct unit *u, struct order *ord, int mno, int mtype); void cmistake(const struct unit *u, struct order *ord, int mno, int mtype);
struct message * msg_error(const struct unit * u, struct order *ord, int mno); struct message * msg_error(const struct unit * u, struct order *ord, int mno);
#ifdef __cplusplus #ifdef __cplusplus
} }