Skip to content

Commit

Permalink
Merge pull request #3112 from geky/events-no-unused-id
Browse files Browse the repository at this point in the history
events - Remove unused variable warning in ndebug builds
  • Loading branch information
0xc0170 committed Oct 25, 2016
2 parents 2175009 + 2fefc05 commit ecbfaa7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions events/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class Event<void()> {
* @param a0..a4 Arguments to pass to the event
*/
void call() const {
int id = post();
MBED_UNUSED int id = post();
MBED_ASSERT(id);
}

Expand Down Expand Up @@ -540,7 +540,7 @@ class Event<void(A0)> {
* @param a0..a4 Arguments to pass to the event
*/
void call(A0 a0) const {
int id = post(a0);
MBED_UNUSED int id = post(a0);
MBED_ASSERT(id);
}

Expand Down Expand Up @@ -933,7 +933,7 @@ class Event<void(A0, A1)> {
* @param a0..a4 Arguments to pass to the event
*/
void call(A0 a0, A1 a1) const {
int id = post(a0, a1);
MBED_UNUSED int id = post(a0, a1);
MBED_ASSERT(id);
}

Expand Down Expand Up @@ -1326,7 +1326,7 @@ class Event<void(A0, A1, A2)> {
* @param a0..a4 Arguments to pass to the event
*/
void call(A0 a0, A1 a1, A2 a2) const {
int id = post(a0, a1, a2);
MBED_UNUSED int id = post(a0, a1, a2);
MBED_ASSERT(id);
}

Expand Down Expand Up @@ -1719,7 +1719,7 @@ class Event<void(A0, A1, A2, A3)> {
* @param a0..a4 Arguments to pass to the event
*/
void call(A0 a0, A1 a1, A2 a2, A3 a3) const {
int id = post(a0, a1, a2, a3);
MBED_UNUSED int id = post(a0, a1, a2, a3);
MBED_ASSERT(id);
}

Expand Down Expand Up @@ -2112,7 +2112,7 @@ class Event<void(A0, A1, A2, A3, A4)> {
* @param a0..a4 Arguments to pass to the event
*/
void call(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const {
int id = post(a0, a1, a2, a3, a4);
MBED_UNUSED int id = post(a0, a1, a2, a3, a4);
MBED_ASSERT(id);
}

Expand Down

0 comments on commit ecbfaa7

Please sign in to comment.