Skip to content

Commit

Permalink
fix signed/unsigned warning.
Browse files Browse the repository at this point in the history
array lengths should never be negative so it make sense to use unsigned
here.
  • Loading branch information
hydra committed May 11, 2016
1 parent dbf8057 commit 1e14fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/io/ledstrip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ void pgResetFn_colors(hsvColor_t *instance)
{
BUILD_BUG_ON(ARRAYLEN(*colors_arr()) <= ARRAYLEN(defaultColors));

for (int colorIndex = 0; colorIndex < ARRAYLEN(defaultColors); colorIndex++) {
for (uint8_t colorIndex = 0; colorIndex < ARRAYLEN(defaultColors); colorIndex++) {

This comment has been minimized.

Copy link
@ledvinap

ledvinap May 12, 2016

Contributor

using plain 'unsigned' will generate smaller+faster code ..

*instance++ = *defaultColors[colorIndex];
}
}
Expand Down

0 comments on commit 1e14fd7

Please sign in to comment.