Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58106b0

Browse files
Fix -Wshadow warning for Interrupt callbacks
Adding -Wshadow to builds identified a template for the Interruptcallback which used a local variable the same as the class variable.Rename the local variable to not shadow the class one and makeGCC happier.
1 parent4a02bfc commit58106b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎api/Interrupts.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ template<typename T> void attachInterrupt(pin_size_t interruptNum, voidTemplateF
4747
// TODO: add structure to delete(__container__) when detachInterrupt() is called
4848
auto f = [](void* a) ->void
4949
{
50-
Tparam = *(T*)((struct__container__<T>*)a)->param;
51-
(((struct__container__<T>*)a)->function)(param);
50+
Tfuncparam = *(T*)((struct__container__<T>*)a)->param;
51+
(((struct__container__<T>*)a)->function)(funcparam);
5252
};
5353

5454
attachInterruptParam(interruptNum, f, mode, cont);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp