tweaks to clean up a couple warnings.

This commit is contained in:
Mark VanderVoord
2026-07-07 15:37:06 -04:00
parent 9f8694c04c
commit 76e0803cb4
4 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ int FindFunction_WhichIsBroken(int NumberToFind)
int i = 0;
while (i < 8) //Notice I should have been in braces
i++;
if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it!
return i;
if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it!
return i;
return 0;
}
+1 -1
View File
@@ -107,7 +107,7 @@ module RakefileHelpers
hash[:arguments].each do |arg|
if arg.include? '$'
if arg.include? '${5}'
all_paths = [ File.join('..','src'), $extra_paths, 'src', File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact
all_paths = [ File.join('..','src'), $extra_paths, File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact
all_paths.each { |f| args << arg.gsub('${5}', f) }
elsif arg.include? '${6}'
-1
View File
@@ -61,7 +61,6 @@
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
+4 -4
View File
@@ -237,7 +237,7 @@ TEST_MATRIX([2, 5l, 4u+3, 4ul], [-2, 3])
void test_TwoMatrices(unsigned first, signed second)
{
static unsigned idx = 0;
static const unsigned expected[] =
static const signed expected[] =
{
// -2 3
-4, 6, // 2
@@ -245,7 +245,7 @@ void test_TwoMatrices(unsigned first, signed second)
-14, 21, // 7
-8, 12, // 4
};
TEST_ASSERT_EQUAL_INT(expected[idx++], first * second);
TEST_ASSERT_EQUAL_INT(expected[idx++], (signed)first * second);
}
TEST_MATRIX(["String1", "String,2", "Stri" "ng3", "String[4]", "String\"5\""], [-5, 12.5f])
@@ -298,10 +298,10 @@ void test_EnumCharAndArrayMatrices(test_enum_t e, float n, char c)
TEST_ASSERT_EQUAL_CHAR(exp_char[char_idx], c);
char_idx = (char_idx + 1) % 6;
if (char_idx == 0.0f)
if ((float)char_idx == 0.0f)
{
float_idx = (float_idx + 1) % 3;
if (float_idx == 0.0f)
if ((float)float_idx == 0.0f)
{
enum_idx = (enum_idx + 1) % 3;
}