Skip to content

Commit ecbfaa7

Browse files
authored
Merge pull request #3112 from geky/events-no-unused-id
events - Remove unused variable warning in ndebug builds
2 parents 2175009 + 2fefc05 commit ecbfaa7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

events/Event.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class Event<void()> {
147147
* @param a0..a4 Arguments to pass to the event
148148
*/
149149
void call() const {
150-
int id = post();
150+
MBED_UNUSED int id = post();
151151
MBED_ASSERT(id);
152152
}
153153

@@ -540,7 +540,7 @@ class Event<void(A0)> {
540540
* @param a0..a4 Arguments to pass to the event
541541
*/
542542
void call(A0 a0) const {
543-
int id = post(a0);
543+
MBED_UNUSED int id = post(a0);
544544
MBED_ASSERT(id);
545545
}
546546

@@ -933,7 +933,7 @@ class Event<void(A0, A1)> {
933933
* @param a0..a4 Arguments to pass to the event
934934
*/
935935
void call(A0 a0, A1 a1) const {
936-
int id = post(a0, a1);
936+
MBED_UNUSED int id = post(a0, a1);
937937
MBED_ASSERT(id);
938938
}
939939

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

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

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

0 commit comments

Comments
 (0)